Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_service_scenario.py test fails with syntax error #328

Open
glaubitz opened this issue Mar 18, 2022 · 0 comments
Open

test_service_scenario.py test fails with syntax error #328

glaubitz opened this issue Mar 18, 2022 · 0 comments

Comments

@glaubitz
Copy link

I'm currently packaging azdev for openSUSE Tumbleweed:

See: https://build.opensuse.org/package/show/home:glaubitz:branches:Cloud:Tools/azdev

The testsuite currently fails in test_service_scenario.py with a syntax error, even on Python 3.8 (since Python 3.9 and 3.10 are not recommended):

[    9s] + pytest-3.8 --ignore=_build. --ignore=_build.python38 -v
[    9s] ============================= test session starts ==============================
[    9s] platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/bin/python3.8
[    9s] cachedir: .pytest_cache
[    9s] rootdir: /home/abuild/rpmbuild/BUILD/azdev-0.1.36
[    9s] plugins: xdist-2.5.0, forked-1.3.0
[    9s] collecting ... collected 0 items / 1 error
[    9s] 
[    9s] ==================================== ERRORS ====================================
[    9s] ________ ERROR collecting azdev/mod_templates/test_service_scenario.py _________
[    9s] /usr/lib/python3.8/site-packages/_pytest/python.py:578: in _importtestmodule
[    9s]     mod = import_path(self.fspath, mode=importmode)
[    9s] /usr/lib/python3.8/site-packages/_pytest/pathlib.py:524: in import_path
[    9s]     importlib.import_module(module_name)
[    9s] /usr/lib64/python3.8/importlib/__init__.py:127: in import_module
[    9s]     return _bootstrap._gcd_import(name[level:], package, level)
[    9s] <frozen importlib._bootstrap>:1014: in _gcd_import
[    9s]     ???
[    9s] <frozen importlib._bootstrap>:991: in _find_and_load
[    9s]     ???
[    9s] <frozen importlib._bootstrap>:975: in _find_and_load_unlocked
[    9s]     ???
[    9s] <frozen importlib._bootstrap>:671: in _load_unlocked
[    9s]     ???
[    9s] /usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:161: in exec_module
[    9s]     source_stat, co = _rewrite_test(fn, self.config)
[    9s] /usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:362: in _rewrite_test
[    9s]     tree = ast.parse(source, filename=fn_)
[    9s] /usr/lib64/python3.8/ast.py:47: in parse
[    9s]     return compile(source, filename, mode, flags,
[    9s] E     File "/home/abuild/rpmbuild/BUILD/azdev-0.1.36/azdev/mod_templates/test_service_scenario.py", line 16
[    9s] E       class {{ name.capitalize() }}ScenarioTest(ScenarioTest):
[    9s] E             ^
[    9s] E   SyntaxError: invalid syntax
[    9s] =========================== short test summary info ============================
[    9s] ERROR azdev/mod_templates/test_service_scenario.py
[    9s] !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
[    9s] =============================== 1 error in 0.16s ===============================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant