  
      self.assertEqual(file_cached.get_length(), file_downloaded.get_length())
      self.assertEqual(response_cached, response_downloaded)
  
    def test_small_file(self):
      # Make sure we don't force cache
      os.environ["FILEREADER_CACHE"] = "0"
      small_file_url = "https://raw.githubusercontent.com/commaai/openpilot/master/docs/SAFETY.md"
      #  If you want large file to be larger than a chunk
      #  large_file_url = "https://commadataci.blob.core.windows.net/openpilotci/0375fdf7b1ce594d/2019-06-13--08-32-25/3/fcamera.hevc"
 
</s> remove     shutil.rmtree(CACHE_DIR)

 </s> add  </s> remove 
os.environ["COMMA_CACHE"] = "/tmp/__test_cache__"
from openpilot.tools.lib.url_file import URLFile, CACHE_DIR
 </s> add from openpilot.tools.lib.url_file import URLFile
from tools.lib.tests import temporary_cache_dir </s> remove import shutil
 </s> add 
  @temporary_cache_dir
  
      self.assertEqual(file_cached.get_length(), file_downloaded.get_length())
      self.assertEqual(response_cached, response_downloaded)
  
  @temporary_cache_dir
    def test_small_file(self):
      # Make sure we don't force cache
      os.environ["FILEREADER_CACHE"] = "0"
      small_file_url = "https://raw.githubusercontent.com/commaai/openpilot/master/docs/SAFETY.md"
      #  If you want large file to be larger than a chunk
      #  large_file_url = "https://commadataci.blob.core.windows.net/openpilotci/0375fdf7b1ce594d/2019-06-13--08-32-25/3/fcamera.hevc"
keep keep keep add keep keep keep keep keep keep
 Tests: test_caching reduce global state (#29681) 
tools/lib/tests/test_caching.py