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 50653cc commit 4b17139
Showing 1 changed file with 3 additions and 3 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

0 comments on commit 4b17139

Please sign in to comment.