parent
f1570dc038
commit
710446420c
|
@ -448,7 +448,10 @@ class TestMetafunc:
|
||||||
enum = pytest.importorskip("enum")
|
enum = pytest.importorskip("enum")
|
||||||
e = enum.Enum("Foo", "one, two")
|
e = enum.Enum("Foo", "one, two")
|
||||||
result = idmaker(("a", "b"), [pytest.param(e.one, e.two)])
|
result = idmaker(("a", "b"), [pytest.param(e.one, e.two)])
|
||||||
assert result == ["Foo.one-Foo.two"]
|
if sys.version_info[:2] >= (3, 10):
|
||||||
|
assert result == ["one-two"]
|
||||||
|
else:
|
||||||
|
assert result == ["Foo.one-Foo.two"]
|
||||||
|
|
||||||
def test_idmaker_idfn(self) -> None:
|
def test_idmaker_idfn(self) -> None:
|
||||||
"""#351"""
|
"""#351"""
|
||||||
|
|
|
@ -744,10 +744,16 @@ def test_run_result_repr() -> None:
|
||||||
|
|
||||||
# known exit code
|
# known exit code
|
||||||
r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5)
|
r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5)
|
||||||
assert (
|
if sys.version_info[:2] >= (3, 10):
|
||||||
repr(r) == "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
|
assert repr(r) == (
|
||||||
" len(stderr.lines)=4 duration=0.50s>"
|
"<RunResult ret=TESTS_FAILED len(stdout.lines)=3"
|
||||||
)
|
" len(stderr.lines)=4 duration=0.50s>"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
assert repr(r) == (
|
||||||
|
"<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
|
||||||
|
" len(stderr.lines)=4 duration=0.50s>"
|
||||||
|
)
|
||||||
|
|
||||||
# unknown exit code: just the number
|
# unknown exit code: just the number
|
||||||
r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)
|
r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)
|
||||||
|
|
Loading…
Reference in New Issue