jenkins-bot submitted this change.
[tests] Enable tests for version.py
version.py does not respect neither -help nor -simulate option.
Anyway we can run script_tests.py with it.
- version -help does not return the expected result. Therefore
add 'version' to _expected_failures dict
- version -simulate gives other result than default. Add the
response to no_args_expected_results dict
Bug: T193972
Change-Id: I0a4c220f0611632983a2d6a32ae401cbc4583c73
---
M tests/script_tests.py
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/script_tests.py b/tests/script_tests.py
index dac48de..7ab84e5 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -50,9 +50,8 @@
failed_dep_script_set = {name for name in script_deps
if not check_script_deps(name)}
-unrunnable_script_set = {
- 'version', # does not use global args
-}
+# scripts which cannot be tested
+unrunnable_script_set = set()
def list_scripts(path, exclude=None):
@@ -136,6 +135,7 @@
'shell': ('>>> ', 'Welcome to the'),
'transferbot': 'Target site not different from source site',
'unusedfiles': ('Working on', None),
+ 'version': 'Pywikibot: [',
'watchlist': 'Retrieving watchlist',
# The following auto-run and typically can't be validated,
@@ -359,7 +359,7 @@
# Here come scripts requiring and missing dependencies, that haven't been
# fixed to output -help in that case.
- _expected_failures = set()
+ _expected_failures = {'version'}
_allowed_failures = []
_arguments = '-help'
To view, visit change 588138. To unsubscribe, or for help writing mail filters, visit settings.