@@ -1302,26 +1302,22 @@ def fix(): return 1
1302
1302
testdir .makepyfile (bar = "def bar(): pass" )
1303
1303
foobar_path = testdir .makepyfile (foobar = "def foobar(): pass" )
1304
1304
self .initial_paths .add (foobar_path )
1305
- print ("foobar_path" , foobar_path , hash (foobar_path ))
1306
- print ("hashes" , [hash (x ) for x in self .initial_paths ])
1307
- print ("fspaths" , [os .fspath (x ) for x in self .initial_paths ])
1308
- assert foobar_path in self .initial_paths
1309
-
1310
- # # conftest files should always be rewritten
1311
- # assert hook.find_spec("conftest") is not None
1312
- # assert self.find_spec_calls == ["conftest"]
1313
- #
1314
- # # files matching "python_files" mask should always be rewritten
1315
- # assert hook.find_spec("test_foo") is not None
1316
- # assert self.find_spec_calls == ["conftest", "test_foo"]
1317
- #
1318
- # # file does not match "python_files": early bailout
1319
- # assert hook.find_spec("bar") is None
1320
- # assert self.find_spec_calls == ["conftest", "test_foo"]
1305
+
1306
+ # conftest files should always be rewritten
1307
+ assert hook .find_spec ("conftest" ) is not None
1308
+ assert self .find_spec_calls == ["conftest" ]
1309
+
1310
+ # files matching "python_files" mask should always be rewritten
1311
+ assert hook .find_spec ("test_foo" ) is not None
1312
+ assert self .find_spec_calls == ["conftest" , "test_foo" ]
1313
+
1314
+ # file does not match "python_files": early bailout
1315
+ assert hook .find_spec ("bar" ) is None
1316
+ assert self .find_spec_calls == ["conftest" , "test_foo" ]
1321
1317
1322
1318
# file is an initial path (passed on the command-line): should be rewritten
1323
1319
assert hook .find_spec ("foobar" ) is not None
1324
- assert self .find_spec_calls == ["foobar" ]
1320
+ assert self .find_spec_calls == ["conftest" , "test_foo" , " foobar" ]
1325
1321
1326
1322
def test_pattern_contains_subdirectories (self , testdir , hook ):
1327
1323
"""If one of the python_files patterns contain subdirectories ("tests/**.py") we can't bailout early
0 commit comments