Skip to content

Commit 2e7fce7

Browse files
committed
Fixing CI tests
Pytest made breaking change to drop support for pytest_namespace and only supporting pytest_configure as shown by pytest-dev/pytest#4421.
1 parent 86a28dc commit 2e7fce7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/conftest.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ def run(directory, command, *args, **kwargs):
4545
return run_command(str(directory), [str(i) for i in command], *args, **kwargs)
4646

4747

48-
def pytest_namespace():
48+
def pytest_configure():
4949
"""Add objects to the pytest namespace. Can be retrieved by importing pytest and accessing pytest.<name>.
5050
5151
:return: Namespace dict.
5252
:rtype: dict
5353
"""
54-
return dict(
55-
author_committer_dates=author_committer_dates,
56-
ROOT_TS=ROOT_TS,
57-
run=run,
58-
)
54+
pytest.author_committer_dates = author_committer_dates
55+
pytest.ROOT_TS = ROOT_TS
56+
pytest.run = run
57+
# return dict(
58+
# author_committer_dates=author_committer_dates,
59+
# ROOT_TS=ROOT_TS,
60+
# run=run,
61+
# )
5962

6063

6164
@pytest.fixture

0 commit comments

Comments
 (0)