Fix lineno offset in show_skipped
The line number is 0-based here, so add 1.
This commit is contained in:
parent
70d9f8638f
commit
869eed9898
|
@ -382,4 +382,4 @@ def show_skipped(terminalreporter, lines):
|
|||
reason = reason[9:]
|
||||
lines.append(
|
||||
"SKIP [%d] %s:%d: %s" %
|
||||
(num, fspath, lineno, reason))
|
||||
(num, fspath, lineno + 1, reason))
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix lineno offset in show_skipped.
|
|
@ -708,7 +708,7 @@ def test_skipped_reasons_functional(testdir):
|
|||
)
|
||||
result = testdir.runpytest('-rs')
|
||||
result.stdout.fnmatch_lines([
|
||||
"*SKIP*2*conftest.py:3: test",
|
||||
"*SKIP*2*conftest.py:4: test",
|
||||
])
|
||||
assert result.ret == 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue