(self)
| 157 | "Comparing mismatched directories fails") |
| 158 | |
| 159 | def test_cmpfiles_invalid_names(self): |
| 160 | # See https://github.com/python/cpython/issues/122400. |
| 161 | for file, desc in [ |
| 162 | ('\x00', 'NUL bytes filename'), |
| 163 | (__file__ + '\x00', 'filename with embedded NUL bytes'), |
| 164 | ("\uD834\uDD1E.py", 'surrogate codes (MUSICAL SYMBOL G CLEF)'), |
| 165 | ('a' * 1_000_000, 'very long filename'), |
| 166 | ]: |
| 167 | for other_dir in [self.dir, self.dir_same, self.dir_diff]: |
| 168 | with self.subTest(f'cmpfiles: {desc}', other_dir=other_dir): |
| 169 | res = filecmp.cmpfiles(self.dir, other_dir, [file]) |
| 170 | self.assertTupleEqual(res, ([], [], [file])) |
| 171 | |
| 172 | def test_dircmp_invalid_names(self): |
| 173 | for bad_dir, desc in [ |
nothing calls this directly
no test coverage detected