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

Function test_cache

IPython/core/tests/test_compilerop.py:42–48  ·  view source on GitHub ↗

Test the compiler correctly compiles and caches inputs

()

Source from the content-addressed store, hash-verified

40
41
42def test_cache():
43 """Test the compiler correctly compiles and caches inputs
44 """
45 cp = compilerop.CachingCompiler()
46 ncache = len(linecache.cache)
47 cp.cache('x=1')
48 nt.assert_true(len(linecache.cache) > ncache)
49
50def test_proper_default_encoding():
51 # Check we're in a proper Python 2 environment (some imports, such

Callers

nothing calls this directly

Calls 1

cacheMethod · 0.95

Tested by

no test coverage detected