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

Method test_unary_op

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

Source from the content-addressed store, hash-verified

453 getmsg(f2, must_pass=True)
454
455 def test_unary_op(self) -> None:
456 def f1() -> None:
457 x = True
458 assert not x
459
460 assert getmsg(f1) == "assert not True"
461
462 def f2() -> None:
463 x = 0
464 assert ~x + 1
465
466 assert getmsg(f2) == "assert (~0 + 1)"
467
468 def f3() -> None:
469 x = 3
470 assert -x + x
471
472 assert getmsg(f3) == "assert (-3 + 3)"
473
474 def f4() -> None:
475 x = 0
476 assert +x + x
477
478 assert getmsg(f4) == "assert (+0 + 0)"
479
480 def test_binary_op(self) -> None:
481 def f1() -> None:

Callers

nothing calls this directly

Calls 1

getmsgFunction · 0.85

Tested by

no test coverage detected