• Home
  • Raw
  • Download

Lines Matching +full:file +full:- +full:entry +full:- +full:cache

55         self.file_byte_string = ''.join(self.file_list).encode('utf-8')
97 file_byte_string = b'# coding=utf-8\n\x80abc'
107 self.assertEqual(getline(FILENAME, -1), EMPTY)
117 for entry in MODULES:
118 filename = os.path.join(MODULE_PATH, entry) + '.py'
119 with open(filename, encoding='utf-8') as file:
120 for index, line in enumerate(file):
129 with open(os_helper.TESTFN, "w", encoding='utf-8') as fp:
136 for entry in MODULES:
137 filename = os.path.join(MODULE_PATH, entry) + '.py'
143 cached_empty = [fn for fn in cached if fn not in linecache.cache]
146 # Can we clear the cache?
148 cached_empty = [fn for fn in cached if fn in linecache.cache]
153 # Create a source file and cache its contents
156 with open(source_name, 'w', encoding='utf-8') as source:
162 with open(source_name, encoding='utf-8') as source:
167 with open(source_name, 'w', encoding='utf-8') as source:
170 # Try to update a bogus cache entry
173 # Check that the cache matches the old contents
177 # Update the cache and check whether it matches the new source file
179 with open(source_name, encoding='utf-8') as source:
195 self.assertEqual(1, len(linecache.cache[NONEXISTENT_FILENAME]))
224 self.assertEqual(4, len(linecache.cache[NONEXISTENT_FILENAME]))
254 with open(fname, 'w', encoding='utf-8') as source:
257 self.assertNotIn(fname, linecache.cache)
259 self.assertIn(fname, linecache.cache)
262 with open(self.modified_file, 'w', encoding='utf-8') as source:
267 self.assertNotIn(self.deleted_file, linecache.cache)
268 self.assertIn(self.modified_file, linecache.cache)
269 self.assertIn(self.unchanged_file, linecache.cache)
273 self.assertIn(self.deleted_file, linecache.cache)
274 self.assertNotIn(self.modified_file, linecache.cache)
275 self.assertIn(self.unchanged_file, linecache.cache)
279 self.assertNotIn(self.deleted_file, linecache.cache)
280 self.assertNotIn(self.modified_file, linecache.cache)
281 self.assertIn(self.unchanged_file, linecache.cache)