Rename pathlib hook parameters (#9363)

* Rename pytest_ignore_collect fspath parameter to collection_path

* Rename pytest_collect_file fspath parameter to file_path

* Rename pytest_pycollect_makemodule fspath parameter to module_path

* Rename pytest_report_header startpath parameter to start_path

* Rename pytest_report_collectionfinish startpath parameter to start_path

* Update docs with the renamed parameters

* Use pytest-flakes fork temporarily to prove it works

* Use pytest-flakes 4.0.5
This commit is contained in:
Bruno Oliveira
2021-12-03 09:14:09 -03:00
committed by GitHub
parent 96366dca42
commit a335ade1f5
21 changed files with 128 additions and 124 deletions

View File

@@ -1,2 +1,2 @@
def pytest_ignore_collect(fspath):
def pytest_ignore_collect(collection_path):
return False

View File

@@ -11,5 +11,5 @@ class CustomFile(pytest.File):
yield CustomItem.from_parent(name="foo", parent=self)
def pytest_collect_file(fspath, parent):
return CustomFile.from_parent(path=fspath, parent=parent)
def pytest_collect_file(file_path, parent):
return CustomFile.from_parent(path=file_path, parent=parent)

View File

@@ -6,8 +6,8 @@ class MyFile(pytest.File):
return [MyItem.from_parent(name="hello", parent=self)]
def pytest_collect_file(fspath, parent):
return MyFile.from_parent(path=fspath, parent=parent)
def pytest_collect_file(file_path, parent):
return MyFile.from_parent(path=file_path, parent=parent)
class MyItem(pytest.Item):