Don’t lowercase the test filename (#871)

This test fails if Cosmo builds from a path that contains an uppercase character.

Paths with uppercase characters aren’t so common in server Linux. But they are in *desktop* Linux. Guess how I…?

But I digress.

The real problem is that the path is lowercased on one line, but not the next:

```
        self.file_name = support.TESTFN.lower()
        self.file_path = FakePath(support.TESTFN)
```

Given that no other test in the suite lowercases `support.TESTFN`, I opted to remove it from the first line rather than adding it to the second.
This commit is contained in:
Michael Lenaghan 2023-08-10 00:13:03 -04:00 committed by GitHub
parent dd53f31147
commit e3c456d23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -516,7 +516,7 @@ class CommonTest(GenericTest):
class PathLikeTests(unittest.TestCase):
def setUp(self):
self.file_name = support.TESTFN.lower()
self.file_name = support.TESTFN
self.file_path = FakePath(support.TESTFN)
self.addCleanup(support.unlink, self.file_name)
create_file(self.file_name, b"test_genericpath.PathLikeTests")