File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -90,22 +90,22 @@ def pytest_configure(config):
9090 pytest .exit ("\n " .join (msgs ))
9191
9292
93- def pytest_collect_file (path , parent ):
94- dir = os . path . abspath ( path . dirname )
93+ def pytest_collect_file (file_path , parent ):
94+ dir = file_path . parent
9595 dir_and_parents = set ()
9696 while dir not in dir_and_parents :
9797 dir_and_parents .add (dir )
98- dir = os . path . dirname ( dir )
98+ dir = dir . parent
9999
100100 if _tree_construction in dir_and_parents :
101- if path . ext == ".dat" :
102- return TreeConstructionFile .from_parent (parent , fspath = path )
101+ if file_path . suffix == ".dat" :
102+ return TreeConstructionFile .from_parent (parent , path = file_path )
103103 elif _tokenizer in dir_and_parents :
104- if path . ext == ".test" :
105- return TokenizerFile .from_parent (parent , fspath = path )
104+ if file_path . suffix == ".test" :
105+ return TokenizerFile .from_parent (parent , path = file_path )
106106 elif _sanitizer_testdata in dir_and_parents :
107- if path . ext == ".dat" :
108- return SanitizerFile .from_parent (parent , fspath = path )
107+ if file_path . suffix == ".dat" :
108+ return SanitizerFile .from_parent (parent , path = file_path )
109109
110110
111111# Tiny wrapper to allow .from_parent constructors on older pytest for PY27
Original file line number Diff line number Diff line change 33flake8==3.9.2 ; python_version < '3.6'
44flake8>=5.0.4; python_version >= '3.6'
55pytest>=4.6.10,<5 ; python_version < '3'
6- pytest>=5.4.2,<8 ; python_version >= '3'
6+ pytest>=7,<10 ; python_version >= '3'
77coverage>=5.1,<6
88pytest-expect>=1.1.0,<2
99mock>=3.0.5,<4 ; python_version < '3.3'
You can’t perform that action at this time.
0 commit comments