Add test_collection_crash
Reproduces:
INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'
Ref: https://github.com/pytest-dev/pytest-xdist/issues/515
Ref: https://github.com/pytest-dev/pytest/pull/6988
This commit is contained in:
committed by
Bruno Oliveira
parent
23992d874e
commit
d137384315
@@ -1543,3 +1543,22 @@ class TestAPI:
|
|||||||
assert xdist.get_xdist_worker_id(fake_request) == "gw5"
|
assert xdist.get_xdist_worker_id(fake_request) == "gw5"
|
||||||
del fake_request.config.workerinput
|
del fake_request.config.workerinput
|
||||||
assert xdist.get_xdist_worker_id(fake_request) == "master"
|
assert xdist.get_xdist_worker_id(fake_request) == "master"
|
||||||
|
|
||||||
|
|
||||||
|
def test_collection_crash(testdir):
|
||||||
|
p1 = testdir.makepyfile(
|
||||||
|
"""
|
||||||
|
assert 0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
result = testdir.runpytest(p1, "-n1")
|
||||||
|
assert result.ret == 1
|
||||||
|
result.stdout.fnmatch_lines(
|
||||||
|
[
|
||||||
|
"gw0 I",
|
||||||
|
"gw0 [[]0[]]",
|
||||||
|
"*_ ERROR collecting test_collection_crash.py _*",
|
||||||
|
"E assert 0",
|
||||||
|
"*= 1 error in *",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user