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

Method test_isfile_case_2

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

Source from the content-addressed store, hash-verified

41 assert not self.isfile_case("Pkg/sub_package/foo.py")
42
43 def test_isfile_case_2(self) -> None:
44 self.make_file("bar.py")
45 self.make_file("pkg/sub_package/__init__.py")
46 self.make_file("pkg/sub_package/foo.py")
47 # Run twice to test both cached and non-cached code paths.
48 # This reverses the order of checks from test_isfile_case_1.
49 for i in range(2):
50 assert not self.isfile_case("Bar.py")
51 assert not self.isfile_case("pkg/sub_package/__init__.PY")
52 assert not self.isfile_case("pkg/Sub_Package/foo.py")
53 assert not self.isfile_case("Pkg/sub_package/foo.py")
54 for i in range(2):
55 assert self.isfile_case("bar.py")
56 assert self.isfile_case("pkg/sub_package/__init__.py")
57 assert self.isfile_case("pkg/sub_package/foo.py")
58 assert not self.isfile_case("non_existent.py")
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")

Callers

nothing calls this directly

Calls 3

make_fileMethod · 0.95
isfile_caseMethod · 0.95
rangeClass · 0.85

Tested by

no test coverage detected