Skip to content

Commit 6433976

Browse files
committed
test_basic: undo debugging
1 parent c070075 commit 6433976

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

testing/test_assertrewrite.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,26 +1302,22 @@ def fix(): return 1
13021302
testdir.makepyfile(bar="def bar(): pass")
13031303
foobar_path = testdir.makepyfile(foobar="def foobar(): pass")
13041304
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"]
13211317

13221318
# file is an initial path (passed on the command-line): should be rewritten
13231319
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"]
13251321

13261322
def test_pattern_contains_subdirectories(self, testdir, hook):
13271323
"""If one of the python_files patterns contain subdirectories ("tests/**.py") we can't bailout early

0 commit comments

Comments
 (0)