Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyfakefs cannot fake open call if script name has specific ending #569

Closed
hard7 opened this issue Nov 24, 2020 · 3 comments
Closed

pyfakefs cannot fake open call if script name has specific ending #569

hard7 opened this issue Nov 24, 2020 · 3 comments
Labels

Comments

@hard7
Copy link

hard7 commented Nov 24, 2020

In my project I have a file logsio.py and it has open inside. pyfakefs cannot fake it. The issue relates to #552

How To Reproduce

  1. create a python file with a name that ends with io (example: logsio.py)
  2. add a function inside the file that calls open
  3. call this function inside a unit-test using pyfakefs

Enviroment

python -c "import platform; print(platform.platform())"
Linux-4.14.154-boot2docker-x86_64-with

python -c "import sys; print('Python', sys.version)"
Python 3.6.8 (default, Apr  8 2019, 18:17:52)
[GCC 8.3.0]

python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)"
pyfakefs 4.2.1
@mrbean-bremen
Copy link
Member

Thanks! I found the issue, it was indeed related to the fix for #552. I will commit the fix in a moment (if the CI tests pass). Do you need a new release version with the fix?

@hard7
Copy link
Author

hard7 commented Nov 26, 2020

@mrbean-bremen, thanks, that was really fast! It would be great if you make a release with the fix.

@mrbean-bremen
Copy link
Member

Ok, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants