(self)
| 297 | self.assertIsInstance(p, pathlib.PurePosixPath) |
| 298 | |
| 299 | def test_repr_common(self): |
| 300 | for pathstr in ('a', 'a/b', 'a/b/c', '/', '/a/b', '/a/b/c'): |
| 301 | with self.subTest(pathstr=pathstr): |
| 302 | p = self.cls(pathstr) |
| 303 | clsname = p.__class__.__name__ |
| 304 | r = repr(p) |
| 305 | # The repr() is in the form ClassName("forward-slashes path"). |
| 306 | self.assertStartsWith(r, clsname + '(') |
| 307 | self.assertEndsWith(r, ')') |
| 308 | inner = r[len(clsname) + 1 : -1] |
| 309 | self.assertEqual(eval(inner), p.as_posix()) |
| 310 | |
| 311 | def test_fspath_common(self): |
| 312 | P = self.cls |
nothing calls this directly
no test coverage detected