(self)
| 1267 | |
| 1268 | @unittest.skipIf(is_wasi, "WASI has no user accounts.") |
| 1269 | def test_expanduser_common(self): |
| 1270 | P = self.cls |
| 1271 | p = P('~') |
| 1272 | self.assertEqual(p.expanduser(), P(os.path.expanduser('~'))) |
| 1273 | p = P('foo') |
| 1274 | self.assertEqual(p.expanduser(), p) |
| 1275 | p = P('/~') |
| 1276 | self.assertEqual(p.expanduser(), p) |
| 1277 | p = P('../~') |
| 1278 | self.assertEqual(p.expanduser(), p) |
| 1279 | p = P(P('').absolute().anchor) / '~' |
| 1280 | self.assertEqual(p.expanduser(), p) |
| 1281 | p = P('~/a:b') |
| 1282 | self.assertEqual(p.expanduser(), P(os.path.expanduser('~'), './a:b')) |
| 1283 | |
| 1284 | def test_with_segments(self): |
| 1285 | class P(self.cls): |
nothing calls this directly
no test coverage detected