We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
$ pipenv run pytest ========================================== test session starts ========================================== platform linux2 -- Python 2.7.15, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 rootdir: /home/olli/code/da/pyfakefs-bug, inifile: plugins: pyfakefs-3.5.7 collected 1 item test_foo.py F [100%] =============================================== FAILURES ================================================ ______________________________________________ test_import ______________________________________________ fs = <pyfakefs.fake_filesystem.FakeFilesystem object at 0x7fe551c9f310> def test_import(fs): > import foo /home/olli/code/da/pyfakefs-bug/test_foo.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/olli/code/da/pyfakefs-bug/foo.py:1: in <module> ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/__init__.py:86: in <module> ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/_config.py:699: in <module> ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/_config.py:146: in get ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/_config.py:248: in validate ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/_config.py:219: in _import_one_of ??? /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/gevent/_config.py:237: in _import_one ??? /home/olli/.pyenv/versions/2.7.15/lib/python2.7/importlib/__init__.py:37: in import_module ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E NameError: name '__import__' is not defined src/gevent/libev/corecext.pyx:1: NameError =========================================== warnings summary ============================================ test_foo.py::test_import /home/olli/.local/share/virtualenvs/pyfakefs-bug-qrOR-hXJ/lib/python2.7/site-packages/py/_code/_assertionold.py:3: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x. from compiler import parse, ast, pycodegen -- Docs: https://docs.pytest.org/en/latest/warnings.html ================================= 1 failed, 1 warnings in 0.19 seconds ==================================
This happens only in python 2.7.
How To Reproduce
( DIR=$(mktemp -d) cd ${DIR} pipenv --python 2.7 pipenv install pytest pyfakefs gevent cat > foo.py << EOF import gevent EOF cat > test_foo.py << EOF def test_import(fs): import foo EOF pipenv run pytest rm -r ${DIR} )
Your enviroment
$ pipenv run python -c "import platform; print(platform.platform())" Linux-4.20.10-zen1-1-zen-x86_64-with-glibc2.7 $ pipenv run python -c "import sys; print('Python', sys.version)" ('Python', '2.7.15 (default, Oct 1 2018, 22:14:38) \n[GCC 5.5.0 20171010]') $ pipenv run python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)" ('pyfakefs', '3.5.7')
The text was updated successfully, but these errors were encountered:
This could be a duplicate of #469. Can you please check if this also happens with current master?
Sorry, something went wrong.
indeed actual master fixes the issue for me.
Ok, I was planning to make a new minor release anyway - I may do it later today, before this turns up again.
No branches or pull requests
Describe the bug
This happens only in python 2.7.
How To Reproduce
Your enviroment
The text was updated successfully, but these errors were encountered: