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

Method test_show_cache

Lib/test/test_dis.py:2588–2606  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2586 _ = self.invoke_dis('--unknown')
2587
2588 def test_show_cache(self):
2589 # test 'python -m dis -C/--show-caches'
2590 source = 'print()'
2591 expect = '''
2592 0 RESUME 0
2593 CACHE 0 (counter: 0)
2594
2595 1 LOAD_NAME 0 (print)
2596 PUSH_NULL
2597 CALL 0
2598 CACHE 0 (counter: 0)
2599 CACHE 0 (func_version: 0)
2600 CACHE 0
2601 POP_TOP
2602 LOAD_CONST 0 (None)
2603 RETURN_VALUE
2604 '''
2605 for flag in ['-C', '--show-caches']:
2606 self.check_output(source, expect, flag)
2607
2608 def test_show_offsets(self):
2609 # test 'python -m dis -O/--show-offsets'

Callers

nothing calls this directly

Calls 1

check_outputMethod · 0.95

Tested by

no test coverage detected