MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_pack_unpack

Method test_pack_unpack

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

Source from the content-addressed store, hash-verified

146
147 @unittest.expectedFailure # TODO: RUSTPYTHON
148 def test_pack_unpack(self):
149 for line, elem in (
150 ('a, = a,', 'LOAD_CONST',),
151 ('a, b = a, b', 'SWAP',),
152 ('a, b, c = a, b, c', 'SWAP',),
153 ):
154 with self.subTest(line=line):
155 code = compile(line,'','single')
156 self.assertInBytecode(code, elem)
157 self.assertNotInBytecode(code, 'BUILD_TUPLE')
158 self.assertNotInBytecode(code, 'UNPACK_SEQUENCE')
159 self.check_lnotab(code)
160
161 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 2
162 def test_constant_folding_tuples_of_constants(self):

Callers

nothing calls this directly

Calls 5

check_lnotabMethod · 0.95
subTestMethod · 0.80
assertInBytecodeMethod · 0.80
assertNotInBytecodeMethod · 0.80
compileFunction · 0.50

Tested by

no test coverage detected