Skip to content

Commit bdafe53

Browse files
alexbitprophet
authored andcommitted
Fixed tests when running with pytest 8.1
1 parent 5c18490 commit bdafe53

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pytest_relaxed/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
from .fixtures import environ # noqa
1010

1111

12-
def pytest_ignore_collect(path, config):
12+
def pytest_ignore_collect(collection_path, config):
1313
# Ignore files and/or directories marked as private via Python convention.
14-
return path.basename.startswith("_")
14+
return collection_path.name.startswith("_")
1515

1616

1717
# We need to use collect_file, not pycollect_makemodule, as otherwise users

tests/test_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def test_setup_given_inner_class_instances_when_inherited(self, testdir):
208208
testdir.makepyfile(
209209
foo="""
210210
class Outer:
211-
def setup(self):
211+
def setup_method(self):
212212
self.some_attr = 17
213213
214214
class inner:

0 commit comments

Comments
 (0)