jenkins-bot has submitted this change and it was merged. Change subject: [FEAT] Allow tests without tox ......................................................................
[FEAT] Allow tests without tox To test only one module, class or method it's possible to use a syntax like: python -m unittest -v tests.test_commit-message-validator But that does not work if the test is importing the tested module without using an absolute path. Change-Id: I9f4fb85928962611ee0dfd4537593c1cf1691458 --- M tests/test_commit-message-validator.py M tests/test_mw-create-composer-local.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/test_commit-message-validator.py b/tests/test_commit-message-validator.py index 6417cba..7cca2fc 100644 --- a/tests/test_commit-message-validator.py +++ b/tests/test_commit-message-validator.py @@ -12,7 +12,7 @@ cmv = imp.load_source( 'cmv', - os.path.dirname(os.path.dirname(__file__)) + + os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/tools/commit-message-validator.py') diff --git a/tests/test_mw-create-composer-local.py b/tests/test_mw-create-composer-local.py index dbce092..62ffad4 100644 --- a/tests/test_mw-create-composer-local.py +++ b/tests/test_mw-create-composer-local.py @@ -4,7 +4,7 @@ import os import tempfile import unittest -path = os.path.dirname(os.path.dirname(__file__)) \ +path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) \ + '/bin/mw-create-composer-local.py' mw_create_composer_local = imp.load_source('mw-create-composer-local', path) -- To view, visit https://gerrit.wikimedia.org/r/247046 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f4fb85928962611ee0dfd4537593c1cf1691458 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: XZise <commodorefabia...@gmx.de> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits