issue504: verbose output displays node IDs for each test
Replace the verbose per-test reporting format of `file:line test_name RESULT` with the node ID of the test, i.e. `file@line::class::method[param] RESULT`. This patch does not update the examples in the docs; @hpk42 has a script to regenerate those. --HG-- branch : issue504
This commit is contained in:
@@ -1620,22 +1620,22 @@ class TestFixtureMarker:
|
||||
""")
|
||||
result = testdir.runpytest("-v")
|
||||
result.stdout.fnmatch_lines("""
|
||||
test_mod1.py:1: test_func[s1] PASSED
|
||||
test_mod2.py:1: test_func2[s1] PASSED
|
||||
test_mod2.py:3: test_func3[s1-m1] PASSED
|
||||
test_mod2.py:5: test_func3b[s1-m1] PASSED
|
||||
test_mod2.py:3: test_func3[s1-m2] PASSED
|
||||
test_mod2.py:5: test_func3b[s1-m2] PASSED
|
||||
test_mod1.py:1: test_func[s2] PASSED
|
||||
test_mod2.py:1: test_func2[s2] PASSED
|
||||
test_mod2.py:3: test_func3[s2-m1] PASSED
|
||||
test_mod2.py:5: test_func3b[s2-m1] PASSED
|
||||
test_mod2.py:7: test_func4[m1] PASSED
|
||||
test_mod2.py:3: test_func3[s2-m2] PASSED
|
||||
test_mod2.py:5: test_func3b[s2-m2] PASSED
|
||||
test_mod2.py:7: test_func4[m2] PASSED
|
||||
test_mod1.py:3: test_func1[m1] PASSED
|
||||
test_mod1.py:3: test_func1[m2] PASSED
|
||||
test_mod1.py@1::test_func[s1] PASSED
|
||||
test_mod2.py@1::test_func2[s1] PASSED
|
||||
test_mod2.py@3::test_func3[s1-m1] PASSED
|
||||
test_mod2.py@5::test_func3b[s1-m1] PASSED
|
||||
test_mod2.py@3::test_func3[s1-m2] PASSED
|
||||
test_mod2.py@5::test_func3b[s1-m2] PASSED
|
||||
test_mod1.py@1::test_func[s2] PASSED
|
||||
test_mod2.py@1::test_func2[s2] PASSED
|
||||
test_mod2.py@3::test_func3[s2-m1] PASSED
|
||||
test_mod2.py@5::test_func3b[s2-m1] PASSED
|
||||
test_mod2.py@7::test_func4[m1] PASSED
|
||||
test_mod2.py@3::test_func3[s2-m2] PASSED
|
||||
test_mod2.py@5::test_func3b[s2-m2] PASSED
|
||||
test_mod2.py@7::test_func4[m2] PASSED
|
||||
test_mod1.py@3::test_func1[m1] PASSED
|
||||
test_mod1.py@3::test_func1[m2] PASSED
|
||||
""")
|
||||
|
||||
def test_class_ordering(self, testdir):
|
||||
@@ -1672,18 +1672,18 @@ class TestFixtureMarker:
|
||||
""")
|
||||
result = testdir.runpytest("-vs")
|
||||
result.stdout.fnmatch_lines("""
|
||||
test_class_ordering.py:4: TestClass2.test_1[1-a] PASSED
|
||||
test_class_ordering.py:4: TestClass2.test_1[2-a] PASSED
|
||||
test_class_ordering.py:6: TestClass2.test_2[1-a] PASSED
|
||||
test_class_ordering.py:6: TestClass2.test_2[2-a] PASSED
|
||||
test_class_ordering.py:4: TestClass2.test_1[1-b] PASSED
|
||||
test_class_ordering.py:4: TestClass2.test_1[2-b] PASSED
|
||||
test_class_ordering.py:6: TestClass2.test_2[1-b] PASSED
|
||||
test_class_ordering.py:6: TestClass2.test_2[2-b] PASSED
|
||||
test_class_ordering.py:9: TestClass.test_3[1-a] PASSED
|
||||
test_class_ordering.py:9: TestClass.test_3[2-a] PASSED
|
||||
test_class_ordering.py:9: TestClass.test_3[1-b] PASSED
|
||||
test_class_ordering.py:9: TestClass.test_3[2-b] PASSED
|
||||
test_class_ordering.py@4::TestClass2::test_1[1-a] PASSED
|
||||
test_class_ordering.py@4::TestClass2::test_1[2-a] PASSED
|
||||
test_class_ordering.py@6::TestClass2::test_2[1-a] PASSED
|
||||
test_class_ordering.py@6::TestClass2::test_2[2-a] PASSED
|
||||
test_class_ordering.py@4::TestClass2::test_1[1-b] PASSED
|
||||
test_class_ordering.py@4::TestClass2::test_1[2-b] PASSED
|
||||
test_class_ordering.py@6::TestClass2::test_2[1-b] PASSED
|
||||
test_class_ordering.py@6::TestClass2::test_2[2-b] PASSED
|
||||
test_class_ordering.py@9::TestClass::test_3[1-a] PASSED
|
||||
test_class_ordering.py@9::TestClass::test_3[2-a] PASSED
|
||||
test_class_ordering.py@9::TestClass::test_3[1-b] PASSED
|
||||
test_class_ordering.py@9::TestClass::test_3[2-b] PASSED
|
||||
""")
|
||||
|
||||
def test_parametrize_separated_order_higher_scope_first(self, testdir):
|
||||
@@ -2094,7 +2094,7 @@ class TestErrors:
|
||||
def fix1(request):
|
||||
def f():
|
||||
raise KeyError
|
||||
request.addfinalizer(f)
|
||||
request.addfinalizer(f)
|
||||
return object()
|
||||
|
||||
l = []
|
||||
@@ -2113,7 +2113,7 @@ class TestErrors:
|
||||
*KeyError*
|
||||
*3 pass*2 error*
|
||||
""")
|
||||
|
||||
|
||||
|
||||
|
||||
def test_setupfunc_missing_funcarg(self, testdir):
|
||||
|
||||
Reference in New Issue
Block a user