(self)
| 5444 | self.assertRaises(TypeError, self.fspath) |
| 5445 | |
| 5446 | def test_bad_pathlike(self): |
| 5447 | # __fspath__ returns a value other than str or bytes. |
| 5448 | self.assertRaises(TypeError, self.fspath, FakePath(42)) |
| 5449 | # __fspath__ attribute that is not callable. |
| 5450 | c = type('foo', (), {}) |
| 5451 | c.__fspath__ = 1 |
| 5452 | self.assertRaises(TypeError, self.fspath, c()) |
| 5453 | # __fspath__ raises an exception. |
| 5454 | self.assertRaises(ZeroDivisionError, self.fspath, |
| 5455 | FakePath(ZeroDivisionError())) |
| 5456 | |
| 5457 | def test_pathlike_subclasshook(self): |
| 5458 | # bpo-38878: subclasshook causes subclass checks |
nothing calls this directly
no test coverage detected