jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1181286?usp=email )
Change subject: tests: do not exclude failed dependencies for TestScriptHelp
......................................................................
tests: do not exclude failed dependencies for TestScriptHelp
Bug: T276466
Change-Id: Iaf4dbe26da52555e5f5b7460e4aa6746b7602e2f
---
M tests/script_tests.py
1 file changed, 8 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index bc2b346..4827742 100755
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -38,8 +38,6 @@
if script_name in script_deps:
for package_name in script_deps[script_name]:
if not has_module(package_name):
- unittest_print(f'{script_name} depends on {package_name},'
- " which isn't available")
return False
return True
@@ -167,11 +165,15 @@
def filter_scripts(excluded: set[str] | None = None, *,
- exclude_auto_run: bool = False) -> list[str]:
+ exclude_auto_run: bool = False,
+ exclude_failed_dep: bool = True) -> list[str]:
"""Return a filtered list of script names.
:param excluded: Scripts to exclude explicitly.
- :param exclude_auto_run: If True, remove scripts in auto_run_script_set.
+ :param exclude_auto_run: If True, remove scripts in
+ auto_run_script_set.
+ :param exclude_failed_dep: If True, remove scripts in
+ failed_dep_script_set.
:return: A list of valid script names in deterministic order.
"""
excluded = excluded or set()
@@ -180,7 +182,7 @@
name for name in sorted(script_list)
if name != 'login'
and name not in unrunnable_script_set
- and name not in failed_dep_script_set
+ and (not exclude_failed_dep or name not in failed_dep_script_set)
]
if exclude_auto_run:
@@ -329,7 +331,7 @@
_results = None
_skip_results = {}
_timeout = False
- _script_list = filter_scripts()
+ _script_list = filter_scripts(exclude_failed_dep=False)
class TestScriptSimulate(DefaultSiteTestCase, PwbTestCase,
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1181286?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iaf4dbe26da52555e5f5b7460e4aa6746b7602e2f
Gerrit-Change-Number: 1181286
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]