def test_compiler_check_cache():
 cp = compilerop.CachingCompiler()
 cp.cache('x=1', 99)
 linecache.checkcache()
 for k in linecache.cache:
  if k.startswith('<ipython-input-99'):
   break
 else:
  raise AssertionError('Entry for input-99 missing from linecache')

def test_compiler_check_cache ( ) : cp = compilerop . CachingCompiler ( ) cp . cache ( 'x=1' , 99 ) linecache . checkcache ( ) for k in linecache . cache : if k . startswith ( '<ipython-input-99' ) : break else : raise AssertionError ( 'Entry for input-99 missing from linecache' )
test the compiler properly manages the cache .