(self, left, right)
| 3077 | filelinkb_target = os.fsencode(filelink_target) |
| 3078 | |
| 3079 | def assertPathEqual(self, left, right): |
| 3080 | left = os.path.normcase(left) |
| 3081 | right = os.path.normcase(right) |
| 3082 | if sys.platform == 'win32': |
| 3083 | # Bad practice to blindly strip the prefix as it may be required to |
| 3084 | # correctly refer to the file, but we're only comparing paths here. |
| 3085 | has_prefix = lambda p: p.startswith( |
| 3086 | b'\\\\?\\' if isinstance(p, bytes) else '\\\\?\\') |
| 3087 | if has_prefix(left): |
| 3088 | left = left[4:] |
| 3089 | if has_prefix(right): |
| 3090 | right = right[4:] |
| 3091 | self.assertEqual(left, right) |
| 3092 | |
| 3093 | def setUp(self): |
| 3094 | self.assertTrue(os.path.exists(self.filelink_target)) |
no test coverage detected