MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_comparisons

Method test_comparisons

testing/test_assertrewrite.py:626–656  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

624 )
625
626 def test_comparisons(self) -> None:
627 def f1() -> None:
628 a, b = range(2)
629 assert b < a
630
631 assert getmsg(f1) == """assert 1 < 0"""
632
633 def f2() -> None:
634 a, b, c = range(3)
635 assert a > b > c
636
637 assert getmsg(f2) == """assert 0 > 1"""
638
639 def f3() -> None:
640 a, b, c = range(3)
641 assert a < b > c
642
643 assert getmsg(f3) == """assert 1 > 2"""
644
645 def f4() -> None:
646 a, b, c = range(3)
647 assert a < b <= c
648
649 getmsg(f4, must_pass=True)
650
651 def f5() -> None:
652 a, b, c = range(3)
653 assert a < b
654 assert b < c
655
656 getmsg(f5, must_pass=True)
657
658 def test_len(self, request) -> None:
659 def f():

Callers

nothing calls this directly

Calls 1

getmsgFunction · 0.85

Tested by

no test coverage detected