fix test for codecov
This commit is contained in:
parent
61133ba83d
commit
d1722d5c18
|
@ -685,8 +685,9 @@ class TestAssertionRewrite:
|
||||||
assert msg is not None
|
assert msg is not None
|
||||||
assert "<MY42 object> < 0" in msg
|
assert "<MY42 object> < 0" in msg
|
||||||
|
|
||||||
def test_assert_handling_raise_in__iter__(self) -> None:
|
def test_assert_handling_raise_in__iter__(self, pytester: Pytester) -> None:
|
||||||
def f() -> None:
|
pytester.makepyfile(
|
||||||
|
"""\
|
||||||
class A:
|
class A:
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
raise ValueError()
|
raise ValueError()
|
||||||
|
@ -698,10 +699,10 @@ class TestAssertionRewrite:
|
||||||
return "<A object>"
|
return "<A object>"
|
||||||
|
|
||||||
assert A() == A()
|
assert A() == A()
|
||||||
|
"""
|
||||||
msg = getmsg(f)
|
)
|
||||||
assert msg is not None
|
result = pytester.runpytest()
|
||||||
assert "<A object> == <A object>" in msg
|
result.stdout.fnmatch_lines(["*E*assert <A object> == <A object>"])
|
||||||
|
|
||||||
def test_formatchar(self) -> None:
|
def test_formatchar(self) -> None:
|
||||||
def f() -> None:
|
def f() -> None:
|
||||||
|
|
Loading…
Reference in New Issue