Skip to content

Commit 4b69449

Browse files
jfindlaymrbean-bremen
authored andcommitted
Fix fake_pathlib typo
Using the documentation as written without this change: ``` >>> from pyfakefs import fake_filesystem >>> >>> filesystem = fake_filesystem.FakeFilesystem() >>> fake_pathlib_module = fake_filesystem.FakePathlibModule(filesystem) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jfindlay/.local/share/venvs/shell/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py", line 3249, in __getattr__ raise AttributeError(f"No attribute {name!r}.") AttributeError: No attribute 'FakePathlibModule'.. Did you mean: 'FakePathModule'? ```
1 parent 93fee76 commit 4b69449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyfakefs/fake_pathlib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
* Stand-alone with FakeFilesystem:
2323
`filesystem = fake_filesystem.FakeFilesystem()`
24-
`fake_pathlib_module = fake_filesystem.FakePathlibModule(filesystem)`
24+
`fake_pathlib_module = fake_pathlib.FakePathlibModule(filesystem)`
2525
`path = fake_pathlib_module.Path('/foo/bar')`
2626
2727
Note: as the implementation is based on FakeFilesystem, all faked classes
@@ -864,7 +864,7 @@ class FakePathlibModule:
864864
865865
You need a fake_filesystem to use this:
866866
`filesystem = fake_filesystem.FakeFilesystem()`
867-
`fake_pathlib_module = fake_filesystem.FakePathlibModule(filesystem)`
867+
`fake_pathlib_module = fake_pathlib.FakePathlibModule(filesystem)`
868868
"""
869869

870870
def __init__(self, filesystem):

0 commit comments

Comments
 (0)