Skip to content

Commit 43cb5dc

Browse files
committed
CI: windows workaround for pytest-dependency issue
1 parent 4b58f5a commit 43cb5dc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ def pytest_configure(config):
4040

4141
TESTED_VERSIONS['astroquery'] = version.version
4242

43+
# Workaround for https://github.com/RKrahl/pytest-dependency/issues/91
44+
# We use pytest-dependency for some of the remote tests and it is not a critical dependency.
45+
# We don't install it in CI for windows as use the following workaround to ensure the marker is always defined.
46+
if sys.platform == 'win32':
47+
config.addinivalue_line(
48+
"markers", "dependency: this should be set by pytest-dependency, we do it here as a temp workaround"
49+
)
50+
4351

4452
def pytest_addoption(parser):
4553
parser.addoption(

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ test = [
3939
"pytest-timeout",
4040
"pytest-astropy",
4141
"matplotlib",
42-
"pytest-dependency",
42+
# Temp workaround for https://github.com/RKrahl/pytest-dependency/issues/91
43+
"pytest-dependency; platform_system != 'Windows'",
4344
"pytest-rerunfailures",
4445
"fsspec[http]",
4546
"moto[s3]",
@@ -149,7 +150,7 @@ filterwarnings = [
149150
]
150151
markers = [
151152
"bigdata: marks tests that are expected to trigger a large download (deselect with '-m \"not bigdata\"')",
152-
"noautofixt: disabling fixture autouse"
153+
"noautofixt: disabling fixture autouse",
153154
]
154155

155156
[tool.coverage.run]

0 commit comments

Comments
 (0)