diff options
Diffstat (limited to 'pyfakefs/pytest_tests/io.py')
-rw-r--r-- | pyfakefs/pytest_tests/io.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pyfakefs/pytest_tests/io.py b/pyfakefs/pytest_tests/io.py new file mode 100644 index 0000000..e6ea4bf --- /dev/null +++ b/pyfakefs/pytest_tests/io.py @@ -0,0 +1,14 @@ +""" +This is a test case for pyfakefs issue #708. +It tests the usage of an own module with the same name as a patched filesystem +module, the content is taken from the issue. +""" + + +class InputStream: + def __init__(self, name): + self.name = name + + def read(self): + with open(self.name, "r") as f: + return f.readline() |