(self, left, right)
| 3029 | filelinkb_target = os.fsencode(filelink_target) |
| 3030 | |
| 3031 | def assertPathEqual(self, left, right): |
| 3032 | left = os.path.normcase(left) |
| 3033 | right = os.path.normcase(right) |
| 3034 | if sys.platform == 'win32': |
| 3035 | # Bad practice to blindly strip the prefix as it may be required to |
| 3036 | # correctly refer to the file, but we're only comparing paths here. |
| 3037 | has_prefix = lambda p: p.startswith( |
| 3038 | b'\\\\?\\' if isinstance(p, bytes) else '\\\\?\\') |
| 3039 | if has_prefix(left): |
| 3040 | left = left[4:] |
| 3041 | if has_prefix(right): |
| 3042 | right = right[4:] |
| 3043 | self.assertEqual(left, right) |
| 3044 | |
| 3045 | def setUp(self): |
| 3046 | self.assertTrue(os.path.exists(self.filelink_target)) |
no test coverage detected