File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ For test-suites containing test classes, the information about the subclassed
2+ module is now output only if a higher verbosity level is specified (at least
3+ "-vv").
Original file line number Diff line number Diff line change @@ -676,7 +676,9 @@ def mkrel(nodeid):
676676
677677 if fspath :
678678 res = mkrel (nodeid ).replace ("::()" , "" ) # parens-normalization
679- if nodeid .split ("::" )[0 ] != fspath .replace ("\\ " , nodes .SEP ):
679+ if self .verbosity >= 2 and nodeid .split ("::" )[0 ] != fspath .replace (
680+ "\\ " , nodes .SEP
681+ ):
680682 res += " <- " + self .startdir .bestrelpath (fspath )
681683 else :
682684 res = "[location]"
Original file line number Diff line number Diff line change @@ -760,8 +760,8 @@ def join_pythonpath(*dirs):
760760 if hasattr (py .path .local , "mksymlinkto" ):
761761 result .stdout .fnmatch_lines (
762762 [
763- "lib/foo/bar/test_bar.py::test_bar <- local/lib/foo/bar/test_bar.py PASSED*" ,
764- "lib/foo/bar/test_bar.py::test_other <- local/lib/foo/bar/test_bar.py PASSED*" ,
763+ "lib/foo/bar/test_bar.py::test_bar PASSED*" ,
764+ "lib/foo/bar/test_bar.py::test_other PASSED*" ,
765765 "*2 passed*" ,
766766 ]
767767 )
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ class TestMore(BaseTests):
154154 )
155155 result = testdir .runpytest (p2 )
156156 result .stdout .fnmatch_lines (["*test_p2.py .*" , "*1 passed*" ])
157- result = testdir .runpytest ("-v " , p2 )
157+ result = testdir .runpytest ("-vv " , p2 )
158158 result .stdout .fnmatch_lines (
159159 ["*test_p2.py::TestMore::test_p1* <- *test_p1.py*PASSED*" ]
160160 )
@@ -170,7 +170,7 @@ def test_method(self):
170170 """
171171 )
172172 )
173- result = testdir .runpytest ("-v " )
173+ result = testdir .runpytest ("-vv " )
174174 assert result .ret == 0
175175 result .stdout .fnmatch_lines (["*a123/test_hello123.py*PASS*" ])
176176 assert " <- " not in result .stdout .str ()
You can’t perform that action at this time.
0 commit comments