Revert "- Reinforce test_crashing_item to match test name instead of test"
This reverts commit 99f667380f.
This commit is contained in:
@@ -454,30 +454,9 @@ def test_crashing_item(testdir):
|
|||||||
pass
|
pass
|
||||||
""")
|
""")
|
||||||
result = testdir.runpytest("-n2", p)
|
result = testdir.runpytest("-n2", p)
|
||||||
result.stdout.fnmatch_lines(
|
result.stdout.fnmatch_lines([
|
||||||
["*crashed*::test_crash*", "*1 failed*1 passed*"])
|
"*crashed*test_crash*", "*1 failed*1 passed*"
|
||||||
|
])
|
||||||
def test_crashing_item_teardown(testdir):
|
|
||||||
p = testdir.makepyfile("""
|
|
||||||
import py
|
|
||||||
import pytest
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def crash_fixture(request):
|
|
||||||
def kill_me():
|
|
||||||
py.process.kill(os.getpid())
|
|
||||||
request.addfinalizer(kill_me)
|
|
||||||
|
|
||||||
def test_a(crash_fixture):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_b():
|
|
||||||
pass
|
|
||||||
""")
|
|
||||||
result = testdir.runpytest("-n1", p)
|
|
||||||
result.stdout.fnmatch_lines(["*crashed*::test_a*", "*1 failed*2 passed*"])
|
|
||||||
|
|
||||||
|
|
||||||
def test_skipping(testdir):
|
def test_skipping(testdir):
|
||||||
|
|||||||
Reference in New Issue
Block a user