Repository navigation
5.3.5 still got INTERNALERROR about AssertionError #6887
Description
the list I installed
pip list
allure-pytest 2.8.9
allure-python-commons 2.8.9
apipkg 1.5
assertpy 1.0
attrs 19.3.0
certifi 2019.11.28
chardet 3.0.4
click 7.1.1
configparser 4.0.2
coverage 5.0.3
execnet 1.7.1
fastparquet 0.3.3
Flask 1.1.1
idna 2.9
importlib-metadata 1.5.0
itsdangerous 1.1.0
Jinja2 2.11.1
llvmlite 0.31.0
loguru 0.4.1
MarkupSafe 1.1.1
more-itertools 8.2.0
numba 0.48.0
numpy 1.18.1
packaging 20.3
pandas 1.0.1
pip 20.0.2
pluggy 0.13.1
prometheus-client 0.7.1
psutil 5.7.0
py 1.8.1
pyparsing 2.4.6
pytest 5.3.1
pytest-arraydiff 0.2
pytest-assume 2.2.0
pytest-astropy 0.3.0
pytest-base-url 1.4.1
pytest-cov 2.8.1
pytest-doctestplus 0.1.3
pytest-forked 1.1.3
pytest-instafail 0.4.1.post0
pytest-metadata 1.8.0
pytest-openfiles 0.3.0
pytest-ordering 0.6
pytest-picked 0.4.1
pytest-remotedata 0.3.2
pytest-rerunfailures 8.0
pytest-sugar 0.9.2
pytest-timeout 1.3.4
pytest-variables 1.9.0
pytest-xdist 1.31.0
python-dateutil 2.7.3
pytz 2019.3
requests 2.23.0
sage-builtin-operators 3.8.2a1+20200310010827.update
sage-sdk 3.8.2a1+20200310010827.update
setuptools 45.2.0
six 1.14.0
termcolor 1.1.0
thrift 0.13.0
tzlocal 2.0.0
urllib3 1.25.8
wcwidth 0.1.8
websocket-client 0.57.0
Werkzeug 1.0.0
wheel 0.34.2
wrapt 1.12.1
zipp 3.1.0
error :
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 197, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR> self.loop_once()
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR> call(**kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/xdist/dsession.py", line 177, in worker_workerfinished
INTERNALERROR> assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('sdp/test_ftptable.py::TestFtptable::test_tsv_table', )
INTERNALERROR> assert not 'sdp/test_ftptable.py::TestFtptable::test_tsv_table'
Activity
nicoddemus commentedon Mar 10, 2020
Hi @ycwdaaaa,
What happens if you run without pytest-xdist? Do you get a different error?
ycwdaaaa commentedon Mar 11, 2020
I finally got the root cause. my team member made a mistake when use the allure like below.
the correct way is to set the story to 'Table' which is String type, but she use the existing object instead. so the error shows up.
But the pytest's error message is Assertion Error, it's every strange~~
ycwdaaaa commentedon Mar 11, 2020
e....... now it same error shows up again. but I have no idea how to fix it this time.
ycwdaaaa commentedon Mar 11, 2020
update status. I found that if I use the pytest-instafail or I use the python3 -m pytest -v these 2 way to run pytest will happen this error。 maybe these 2 way is conflict with xdist?
ycwdaaaa commentedon Mar 11, 2020
update status. I got the reason, the pytest-timeout si conflict with xdist, I found the issue in github of pytest-timeout
mivade commentedon Mar 11, 2020
I'm seeing something similar seemingly related to the
pytest-flake8plugin:nicoddemus commentedon Mar 12, 2020
@ycwdaaaa so is it a matter of updating pytest-timeout? If so can you close this issue please? Thanks!
@mivade yeah that's a generic term for many possible errors... in that case I suggest to try to update
pytest-flake8(or post an issue there).The-Compiler commentedon Mar 12, 2020
Even if the issue in pytest-timeout, it seems to me like there's some issue in pytest core or xdist about properly reporting the underlying issue, no? It probably should show some kind of proper stacktrace rather than fail an assertion inside xdist?
nicoddemus commentedon Mar 12, 2020
Definitely: pytest-dev/pytest-xdist#204
Unfortunately nobody took the time to improve that.
mivade commentedon Mar 12, 2020
I have tried a lot of different combinations of versions of
pytestandpytest-flake8and am having trouble finding the winning combination that works. In the end the only thing I could do was stop usingpytest-flake8. It seems pretty clear to me that this is an issue withpytestitself though since similar generic errors like these are apparently happening with a variety of plugins.The-Compiler commentedon Mar 12, 2020
Ah, I see - I suppose this can be closed then if the underlying issue is in flake8-timeout indeed.
@mivade Your issue seems to be unrelated - I'd recommend opening an issue in the pytest-flake8 repository as you'd probably be able to reproduce this without pytest-xdist involved.
mivade commentedon Mar 12, 2020
Will do if I can come up with a minimal, reproducible example.
comilao commentedon Mar 18, 2020
Hi, to reproduce the problem. You can create a test that always fails and run with this command
pytest test_always_fail.py --reruns=1pishchalnikov commentedon Mar 19, 2020
Using pytest-rerunfailures==9.0 should solve this problem.
Zac-HD commentedon Jun 9, 2020
Closing this as redundant with pytest-dev/pytest-xdist#204 (for reporting of errors) and downstream plugins (for the errors themselves). Thanks to everyone who helped track down what was happening 😄