pyfakefs
pyfakefs copied to clipboard
Provides a fake file system that mocks the Python file system modules.
**Describe the bug** I noticed `additional_skip_names` works for builtin `open`, `io.open` and `os.open` but it doesn't work for `Path().open` unless I add `pathlib` to `additional_skip_names` too. I guess it is...
#### Describe the changes This PR fixes path separators for Windows paths. > [!NOTE] > > A single regression test for #558 fails as a result of this change, and...
**Describe the bug** When the `fs` fixture is loaded, `pathlib.PureWindowsPath.stem` returns more than the file's stem. **How To Reproduce** ```bash mkdir demo cd demo python -m venv .venv source .venv/bin/activate...
**Is your feature request related to a problem? Please describe.** No implementation for `os.mkfifo()` (Unix only). **Describe the solution you'd like** Add implementation so that real FIFOs don't get created...
The [scandir standalone package](https://pypi.org/project/scandir/) was needed for Python < 3.5 only. Since `pyfakefs` requires Python >= 3.7 the `scandir` should be no longer needed. Unfortunately, there are still some trace...
**Describe the bug** There is a strange interaction going on between OpenPyxl and Pyfakefs via Pandas. I can read and write DataFrames as normal using the fake filesystem and `pd.read_excel`...
This is a spin-off of #904. From the comments: [mrbean-bremen](https://github.com/mrbean-bremen) commented [Nov 12, 2023](https://github.com/pytest-dev/pyfakefs/issues/904#issuecomment-1807134967) @RonnyPfannschmidt - thanks, that worked exactly as you wrote, I'll probably merge this tomorrow if nobody...
Hey, I’ve recently used two other libraries that allow one to stub out certain standard library functions, and I used them together with pyfakefs and really big kudos on how...
I'v been trying to update `pyfakefs` for python>=3.8 and I found that modifications generated by this tool are causing that pytest fails in 6 units. it would be good to...
**Describe the bug** When pyfakefs is loaded via the pytest plugin on Python 3.13.0 beta 1, I'm seeing crashes. > [!Note] > > I've confirmed this behavior with pyfakefs 5.5.0,...