MCPcopy Index your code
hub / github.com/python/mypy / test_isfile_case_3

Method test_isfile_case_3

mypy/test/testfscache.py:61–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 assert not self.isfile_case("pkg/non_existent.py")
60
61 def test_isfile_case_3(self) -> None:
62 self.make_file("bar.py")
63 self.make_file("pkg/sub_package/__init__.py")
64 self.make_file("pkg/sub_package/foo.py")
65 # Run twice to test both cached and non-cached code paths.
66 for i in range(2):
67 assert self.isfile_case("bar.py")
68 assert not self.isfile_case("non_existent.py")
69 assert not self.isfile_case("pkg/non_existent.py")
70 assert not self.isfile_case("Bar.py")
71 assert not self.isfile_case("pkg/sub_package/__init__.PY")
72 assert not self.isfile_case("pkg/Sub_Package/foo.py")
73 assert not self.isfile_case("Pkg/sub_package/foo.py")
74 assert self.isfile_case("pkg/sub_package/__init__.py")
75 assert self.isfile_case("pkg/sub_package/foo.py")
76
77 def test_isfile_case_other_directory(self) -> None:
78 self.make_file("bar.py")

Callers

nothing calls this directly

Calls 3

make_fileMethod · 0.95
isfile_caseMethod · 0.95
rangeClass · 0.85

Tested by

no test coverage detected