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

Method test_bytes

Lib/test/test_symtable.py:479–486  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

477 symbols = symtable.symtable("def f(x): return x", "?", "exec")
478
479 def test_bytes(self):
480 top = symtable.symtable(TEST_CODE.encode('utf8'), "?", "exec")
481 self.assertIsNotNone(find_block(top, "Mine"))
482
483 code = b'# -*- coding: iso8859-15 -*-\nclass \xb4: pass\n'
484
485 top = symtable.symtable(code, "?", "exec")
486 self.assertIsNotNone(find_block(top, "\u017d"))
487
488 def test_symtable_repr(self):
489 self.assertEqual(str(self.top), "<SymbolTable for module ?>")

Callers

nothing calls this directly

Calls 3

find_blockFunction · 0.85
assertIsNotNoneMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected