MCPcopy Create free account
hub / github.com/ipython/ipython / test_compiler_check_cache

Function test_compiler_check_cache

IPython/core/tests/test_compilerop.py:61–73  ·  view source on GitHub ↗

Test the compiler properly manages the cache.

()

Source from the content-addressed store, hash-verified

59 nt.assert_true(len(linecache.cache) > ncache)
60
61def test_compiler_check_cache():
62 """Test the compiler properly manages the cache.
63 """
64 # Rather simple-minded tests that just exercise the API
65 cp = compilerop.CachingCompiler()
66 cp.cache('x=1', 99)
67 # Ensure now that after clearing the cache, our entries survive
68 linecache.checkcache()
69 for k in linecache.cache:
70 if k.startswith('<ipython-input-99'):
71 break
72 else:
73 raise AssertionError('Entry for input-99 missing from linecache')

Callers

nothing calls this directly

Calls 1

cacheMethod · 0.95

Tested by

no test coverage detected