You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def test_literal_list():
assert(
[0,1,2] == [0,1,2]
)
def test_foobar():
assert(
[0,1,2] == list(x for x in range(3))
)
def test_foobar2():
assert (
[x for x in range(3)] == [0, 1, 2]
)
def test_foobar2_oneline():
assert ([x for x in range(3)] == [0, 1, 2])
Issue description:
When using Pytest with pytest-cov and coverage, some lines are marked as not covered.
Originally this issue was created in coverage repository: nedbat/coveragepy#605 (comment)
After manually disabling AssertionRewritingHook (
.../site-packages/_pytest/assertion/__init.__.py
):the result is as expected:
So it seems that the AssertionRewritingHook changes somehow multiline asserts like:
Additional info
Pytest: 3.6.3
OS: Ubuntu 16.04
PIP list
The text was updated successfully, but these errors were encountered: