Skip to content

Commit 437281c

Browse files
pytest: exclude hub files from collection
* JupyterHub messes with the environment causing test failures.
1 parent 78bced9 commit 437281c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

conftest.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,19 @@
1818
]
1919

2020

21+
ignore_collect = [
22+
# jupyterhub stuff messes with the environment
23+
'cylc/uiserver/hubapp.py',
24+
'cylc/uiserver/scripts/hubapp.py',
25+
'cylc/uiserver/scripts/hub.py',
26+
# the jupyter config cannot be imported
27+
'cylc/uiserver/jupyter_config.py',
28+
]
29+
30+
2131
def pytest_ignore_collect(path):
2232
# --doctest-modules seems to ignore the value if configured in pyproject
23-
if 'jupyter_config.py' in str(path):
24-
return True
33+
return any(
34+
ignore_path in str(path)
35+
for ignore_path in ignore_collect
36+
)

0 commit comments

Comments
 (0)