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

Pytest 3.7.0 incompatible with some plugins #3744

Closed
ahmedhosnycs opened this issue Jul 31, 2018 · 2 comments
Closed

Pytest 3.7.0 incompatible with some plugins #3744

ahmedhosnycs opened this issue Jul 31, 2018 · 2 comments
Labels
type: bug problem that needs to be addressed type: regression indicates a problem that was introduced in a release which was working previously

Comments

@ahmedhosnycs
Copy link

ahmedhosnycs commented Jul 31, 2018

(I'm not sure if this is the correct place to add this issue, but I'm sure that this is because of pytest new release 3.7.0)

Today, My testing pipeline was failing. It only fails with flake8 plugins and maybe other plugins.
It happens when I run:

py.test  --flake8 --isort --cache-clear tests/ 

This is the error I got

platform linux -- Python 3.5.2, pytest-3.7.0, py-1.5.4, pluggy-0.7.1
Django settings: main.settings (from ini file)
rootdir: /builds/mic/api/src, inifile: tox.ini
plugins: mock-1.10.0, isort-0.2.0, flake8-1.0.2, faker-2.0.0, factoryboy-2.0.1, env-0.6.2, django-3.3.3, cov-2.5.1, celery-4.1.1
collected 0 items / 1 errors

==================================== ERRORS ====================================
______________________________ ERROR collecting  _______________________________
.tox/quality/lib/python3.5/site-packages/_pytest/runner.py:201: in __init__
    self.result = func()
.tox/quality/lib/python3.5/site-packages/_pytest/runner.py:261: in <lambda>
    call = CallInfo(lambda: list(collector.collect()), "collect")
.tox/quality/lib/python3.5/site-packages/_pytest/main.py:475: in collect
    for x in self._collect(arg):
.tox/quality/lib/python3.5/site-packages/_pytest/main.py:519: in _collect
    for x in root._collectfile(pkginit):
E   AttributeError: 'Flake8Item' object has no attribute '_collectfile'

Part of my requirements

factory-boy==2.11.1,
Faker==0.8.17,
flake8==3.5.0,
ipython==6.5.0,
ipython-genutils==0.2.0,
isort==4.3.4,
Pillow==4.3.0,
pluggy==0.7.1,
prompt-toolkit==1.0.15,
ptyprocess==0.6.0,
py==1.5.4,
pyasn1==0.4.4,
pycodestyle==2.3.1,
pycparser==2.18,
pyflakes==1.6.0,
Pygments==2.2.0,
pyparsing==2.2.0,
pytest==3.7.0,
pytest-cache==1.0,
pytest-cov==2.5.1,
pytest-django==3.3.3,
pytest-env==0.6.2,
pytest-factoryboy==2.0.1,
pytest-faker==2.0.0,
pytest-flake8==1.0.2,
pytest-isort==0.2.0,
pytest-mock==1.10.0,
python-dateutil==2.7.0,
python-memcached==1.58,
pytz==2018.5,
raven==6.2.1,
requests==2.18.4,
s3transfer==0.1.13,
short-url==1.2.2,
simplegeneric==0.8.1,
six==1.11.0,
sqlparse==0.2.4,
text-unidecode==1.2,
tox==3.1.2,
traitlets==4.3.2,
unicodecsv==0.14.1,
urllib3==1.22,
vine==1.1.4,
virtualenv==16.0.0,
wcwidth==0.1.7,
xlrd==1.1.0,
XlsxWriter==1.0.2

How I solved it:
I pinned the version of pytest==3.6.4

If you think that this is not pytest related issue, feel free to close it.

Thanks

@RonnyPfannschmidt
Copy link
Member

this is a duplicate of #3742 - the regression got introduced with the package scope

@RonnyPfannschmidt RonnyPfannschmidt added the type: regression indicates a problem that was introduced in a release which was working previously label Jul 31, 2018
@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #1479 (pytest silently stops importing plugins on ImportError), #1965 (Pytest 3.0.2 memory leak with pytest.raises), #2959 (pytest 3.3.0 immutable fixture params), #1882 (pytest 3.0 on Anaconda), and #3203 (pytest shows 0% test statistics after 3.4.0 with --capture argument).

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

No branches or pull requests

3 participants