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