Skip to content

Commit

Permalink
Update deprecated pytest hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Sep 12, 2024
1 parent 7f6b0e5 commit 4eaa340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions brian2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from brian2.units import ms


def pytest_ignore_collect(path, config):
def pytest_ignore_collect(collection_path, config):
if config.option.doctestmodules:
if "tests" in str(path):
if "tests" in collection_path.parts:
return True # Ignore tests package for doctests
# Do not test brian2.hears bridge (needs Brian1)
if str(path).endswith("hears.py"):
if collection_path.name == "hears.py":
return True


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
]

[project.optional-dependencies]
test = ['pytest', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0', 'pytest-timeout']
test = ['pytest>=8', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0', 'pytest-timeout']
docs = ['sphinx>=7', 'ipython>=5', 'sphinx-tabs']

[project.urls]
Expand Down

0 comments on commit 4eaa340

Please sign in to comment.