diff options
| author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2021-04-09 06:21:29 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-03 09:20:47 +0200 |
| commit | ffc0d57a04141b6bc8f1263849cfcc9566cf63a8 (patch) | |
| tree | 9b84e35c2fb6cc7946c69b71bc4a56a7eae60cb7 /tests/runtests.py | |
| parent | 90f41c2d9165e6e5b7c8f2229f8d01ecc4b99281 (diff) | |
Refs #32668 -- Refactored away module_found_in_labels in runtests.py's setup().
Diffstat (limited to 'tests/runtests.py')
| -rwxr-xr-x | tests/runtests.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index da27fd218f..9c8d88c5ea 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -231,16 +231,17 @@ def setup(verbosity, start_at, start_after, test_labels=None): # if the module (or an ancestor) was named on the command line, or # no modules were named (i.e., run all), import # this module and add it to INSTALLED_APPS. - module_found_in_labels = not test_labels or any( - _module_match_label(module_label, label) for label in test_labels_set - ) + if test_labels and not any( + _module_match_label(test_module, label) for label in test_labels_set + ): + continue - if module_name in CONTRIB_TESTS_TO_APPS and module_found_in_labels: + if module_name in CONTRIB_TESTS_TO_APPS: for contrib_app in CONTRIB_TESTS_TO_APPS[module_name]: if contrib_app not in settings.INSTALLED_APPS: settings.INSTALLED_APPS.append(contrib_app) - if module_found_in_labels and module_label not in installed_app_names: + if module_label not in installed_app_names: if verbosity >= 2: print("Importing application %s" % module_name) settings.INSTALLED_APPS.append(module_label) |
