def test_clearcache(self):
    cached = []
    for entry in TESTS:
        filename = (os.path.join(TEST_PATH, entry) + '.py')
        cached.append(filename)
        linecache.getline(filename, 1)
    cached_empty = [fn for fn in cached if (fn not in linecache.cache)]
    self.assertEqual(cached_empty, [])
    linecache.clearcache()
    cached_empty = [fn for fn in cached if (fn in linecache.cache)]
    self.assertEqual(cached_empty, [])
def test_clearcache(self):
    cached = []
    for entry in TESTS:
        filename = (os.path.join(TEST_PATH, entry) + '.py')
        cached.append(filename)
        linecache.getline(filename, 1)
    cached_empty = [fn for fn in cached if (fn not in linecache.cache)]
    self.assertEqual(cached_empty, [])
    linecache.clearcache()
    cached_empty = [fn for fn in cached if (fn in linecache.cache)]
    self.assertEqual(cached_empty, [])