MCPcopy
hub / github.com/pytest-dev/pytest / test_unary_op

Method test_unary_op

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

Source from the content-addressed store, hash-verified

664 getmsg(f2, must_pass=True)
665
666 def test_unary_op(self) -> None:
667 def f1() -> None:
668 x = True
669 assert not x
670
671 assert getmsg(f1) == "assert not True"
672
673 def f2() -> None:
674 x = 0
675 assert ~x + 1
676
677 assert getmsg(f2) == "assert (~0 + 1)"
678
679 def f3() -> None:
680 x = 3
681 assert -x + x
682
683 assert getmsg(f3) == "assert (-3 + 3)"
684
685 def f4() -> None:
686 x = 0
687 assert +x + x
688
689 assert getmsg(f4) == "assert (+0 + 0)"
690
691 def test_binary_op(self) -> None:
692 def f1() -> None:

Callers

nothing calls this directly

Calls 1

getmsgFunction · 0.85

Tested by

no test coverage detected