Merge pull request #2548 from blueyed/skip-fix-lineno

Fix lineno offset in show_skipped
This commit is contained in:
Bruno Oliveira 2017-07-25 13:35:14 -03:00 committed by GitHub
commit 595ecd23fd
3 changed files with 3 additions and 2 deletions

View File

@ -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))

1
changelog/2548.bugfix Normal file
View File

@ -0,0 +1 @@
Fix lineno offset in show_skipped.

View File

@ -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