Skip to content

Commit 8cf29ad

Browse files
committed
Update test collection to use new file_path parameter. Fixes #5.
1 parent 9a7dec3 commit 8cf29ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pytest_perf/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
from pytest_perf import runner
1515

1616

17-
def pytest_collect_file(parent, path):
18-
if path.basename.endswith('.py') and 'pytest_perf' in path.read_text(
17+
def pytest_collect_file(parent, file_path):
18+
if file_path.stem.endswith('.py') and 'pytest_perf' in file_path.read_text(
1919
encoding='utf-8'
2020
):
21-
return File.from_parent(parent, fspath=path)
21+
return File.from_parent(parent, path=file_path)
2222

2323

2424
def pytest_terminal_summary(terminalreporter, config):

0 commit comments

Comments
 (0)