コード例 #1
0
 def setUp(self):
     tdir = PersistentTemporaryDirectory()
     path_to_dictionary.cache_dir = tdir
     dictionary_name_for_locale.cache_clear()
     dictionary_for_locale.cache_clear()
     get_cache_path.cache_clear()
     is_cache_up_to_date.updated = False
コード例 #2
0
 def tearDown(self):
     dictionary_name_for_locale.cache_clear()
     dictionary_for_locale.cache_clear()
     get_cache_path.cache_clear()
     is_cache_up_to_date.updated = False
     try:
         shutil.rmtree(path_to_dictionary.cache_dir)
     except OSError:
         pass
     path_to_dictionary.cache_dir = None