File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ Below is a complete list of all pytest features which are considered deprecated.
1919:class: `_pytest.warning_types.PytestWarning ` or subclasses, which can be filtered using
2020:ref: `standard warning filters <warnings >`.
2121
22+
23+ Node Construction changed to ``Node.from_parent ``
24+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25+
26+ .. deprecated :: 5.3
27+
28+ The construction of nodes new should use the named constructor ``from_parent ``.
29+ This limitation in api surface intends to enable better/simpler refactoring of the collection tree.
30+
31+
2232``junit_family `` default value change to "xunit2"
2333~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2434
Original file line number Diff line number Diff line change 44
55def pytest_collect_file (parent , path ):
66 if path .ext == ".yaml" and path .basename .startswith ("test" ):
7- return YamlFile ( path , parent )
7+ return YamlFile . from_parent ( parent , fspath = path )
88
99
1010class YamlFile (pytest .File ):
@@ -13,7 +13,7 @@ def collect(self):
1313
1414 raw = yaml .safe_load (self .fspath .open ())
1515 for name , spec in sorted (raw .items ()):
16- yield YamlItem ( name , self , spec )
16+ yield YamlItem . from_parent ( self , name = name , spec = spec )
1717
1818
1919class YamlItem (pytest .Item ):
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ def collect(self):
1313def pytest_pycollect_makemodule (path , parent ):
1414 bn = path .basename
1515 if "py3" in bn and not py3 or ("py2" in bn and py3 ):
16- return DummyCollector ( path , parent = parent )
16+ return DummyCollector . from_parent ( parent , fspath = path )
You can’t perform that action at this time.
0 commit comments