jenkins-bot submitted this change.

View Change

Approvals: Xqt: Verified; Looks good to me, approved jenkins-bot: Verified
[tests] simplify tests collector

Change-Id: I422ced7caf868b9239ead8c1bc1d4d56259144e7
---
M tests/__init__.py
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tests/__init__.py b/tests/__init__.py
index cf3b51c..43aed9d 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -183,11 +183,11 @@
extra_test_modules = _unknown_test_modules()

if 'PYWIKIBOT_TEST_MODULES' in os.environ:
- _enabled_test_modules = os.environ['PYWIKIBOT_TEST_MODULES'].split(',')
- disabled_test_modules = (library_test_modules
- | extra_test_modules
- | script_test_modules
- - set(_enabled_test_modules))
+ enabled_test_modules = os.environ['PYWIKIBOT_TEST_MODULES'].split(',')
+else:
+ enabled_test_modules = chain(library_test_modules,
+ extra_test_modules,
+ script_test_modules)


def unittest_print(*args, **kwargs):
@@ -218,9 +218,7 @@
f' {disabled_tests!r}')

modules = (module
- for module in chain(library_test_modules,
- extra_test_modules,
- script_test_modules)
+ for module in enabled_test_modules
if module not in disabled_test_modules)

test_list = []

To view, visit change 1057899. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I422ced7caf868b9239ead8c1bc1d4d56259144e7
Gerrit-Change-Number: 1057899
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot