MCPcopy Index your code
hub / github.com/python/cpython / test_unot

Method test_unot

Lib/test/test_peepholer.py:85–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 # to be replaced anyway.
84
85 def test_unot(self):
86 # UNARY_NOT POP_JUMP_IF_FALSE --> POP_JUMP_IF_TRUE'
87 def unot(x):
88 if not x == 2:
89 del x
90 self.assertNotInBytecode(unot, 'UNARY_NOT')
91 self.assertNotInBytecode(unot, 'POP_JUMP_IF_FALSE')
92 self.assertInBytecode(unot, 'POP_JUMP_IF_TRUE')
93 self.check_lnotab(unot)
94
95 def test_elim_inversion_of_is_or_in(self):
96 for line, cmp_op, invert in (

Callers

nothing calls this directly

Calls 3

check_lnotabMethod · 0.95
assertNotInBytecodeMethod · 0.80
assertInBytecodeMethod · 0.80

Tested by

no test coverage detected