Merge pull request #2548 from blueyed/skip-fix-lineno
Fix lineno offset in show_skipped
This commit is contained in:
commit
595ecd23fd
|
@ -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