For testing fspath on unknown objects
| 142 | |
| 143 | # fspath protocol |
| 144 | class CustomFSPath: |
| 145 | """For testing fspath on unknown objects""" |
| 146 | |
| 147 | def __init__(self, path): |
| 148 | self.path = path |
| 149 | |
| 150 | def __fspath__(self): |
| 151 | return self.path |
| 152 | |
| 153 | path = CustomFSPath(test_filepath) |
| 154 | assert stringify_path(path) == test_filepath |
no outgoing calls