(self)
| 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") |
| 79 | with tempfile.TemporaryDirectory() as other: |
| 80 | self.make_file("other_dir.py", base=other) |
| 81 | self.make_file("pkg/other_dir.py", base=other) |
| 82 | assert self.isfile_case(os.path.join(other, "other_dir.py")) |
| 83 | assert not self.isfile_case(os.path.join(other, "Other_Dir.py")) |
| 84 | assert not self.isfile_case(os.path.join(other, "bar.py")) |
| 85 | if os.path.exists(os.path.join(other, "PKG/other_dir.py")): |
| 86 | # We only check case for directories under our prefix, and since |
| 87 | # this path is not under the prefix, case difference is fine. |
| 88 | assert self.isfile_case(os.path.join(other, "PKG/other_dir.py")) |
| 89 | |
| 90 | def make_file(self, path: str, base: str | None = None) -> None: |
| 91 | if base is None: |
nothing calls this directly
no test coverage detected