| 114 | } |
| 115 | |
| 116 | def setUp(self): |
| 117 | name = self.id().split('.')[-1] |
| 118 | if name in _tests_needing_posix and self.cls.parser is not posixpath: |
| 119 | self.skipTest('requires POSIX-flavoured path class') |
| 120 | if name in _tests_needing_windows and self.cls.parser is posixpath: |
| 121 | self.skipTest('requires Windows-flavoured path class') |
| 122 | p = self.cls('a') |
| 123 | self.parser = p.parser |
| 124 | self.sep = self.parser.sep |
| 125 | self.altsep = self.parser.altsep |
| 126 | |
| 127 | def _check_str_subclass(self, *args): |
| 128 | # Issue #21127: it should be possible to construct a PurePath object |