fix slightly wrong verbose output for non subclasses on windows
This commit is contained in:
parent
f2670651b3
commit
1a7c6ecc42
|
@ -41,6 +41,9 @@ Changes between 2.0.1 and 2.0.2
|
|||
- fixed typos in the docs (thanks Victor Garcia, Brianna Laugher) and particular
|
||||
thanks to Laura Creighton who also revieved parts of the documentation.
|
||||
|
||||
- fix slighly wrong output of verbose progress reporting for classes
|
||||
(thanks Amaury)
|
||||
|
||||
- more precise (avoiding of) deprecation warnings for node.Class|Function accesses
|
||||
|
||||
- avoid std unittest assertion helper code in tracebacks (thanks Ronny)
|
||||
|
|
|
@ -335,7 +335,7 @@ class TerminalReporter:
|
|||
excrepr.reprcrash.toterminal(self._tw)
|
||||
|
||||
def _locationline(self, collect_fspath, fspath, lineno, domain):
|
||||
if fspath and fspath != collect_fspath:
|
||||
if fspath and fspath.replace("\\", "/") != collect_fspath:
|
||||
fspath = "%s <- %s" % (collect_fspath, fspath)
|
||||
if lineno is not None:
|
||||
lineno += 1
|
||||
|
|
|
@ -130,6 +130,20 @@ class TestTerminal:
|
|||
"*test_p2.py <- *test_p1.py:2: TestMore.test_p1*",
|
||||
])
|
||||
|
||||
def test_itemreport_directclasses_not_shown_as_subclasses(self, testdir):
|
||||
a = testdir.mkpydir("a")
|
||||
a.join("test_hello.py").write(py.code.Source("""
|
||||
class TestClass:
|
||||
def test_method(self):
|
||||
pass
|
||||
"""))
|
||||
result = testdir.runpytest("-v")
|
||||
assert result.ret == 0
|
||||
result.stdout.fnmatch_lines([
|
||||
"*a/test_hello.py*PASS*",
|
||||
])
|
||||
assert " <- " not in result.stdout.str()
|
||||
|
||||
def test_keyboard_interrupt(self, testdir, option):
|
||||
p = testdir.makepyfile("""
|
||||
def test_foobar():
|
||||
|
@ -399,6 +413,7 @@ class TestTerminalFunctional:
|
|||
"*test_verbose_reporting.py:10: test_gen*FAIL*",
|
||||
])
|
||||
assert result.ret == 1
|
||||
|
||||
pytestconfig.pluginmanager.skipifmissing("xdist")
|
||||
result = testdir.runpytest(p1, '-v', '-n 1')
|
||||
result.stdout.fnmatch_lines([
|
||||
|
|
Loading…
Reference in New Issue