def test_missing_pip_cache(self): """ A missing pip cache dir throws an error. """ with tempdir() as basedir: pip_cache_dir = os.path.join(basedir, "pipcache") self.assertRaises( LandingGearError, WheelCacheExtractor, pip_cache_dir)
def test_missing_wheel_cache(self): """ A pip cache dir with no wheel cache returns no packages. """ with tempdir() as basedir: pip_cache_dir = os.path.join(basedir, "pipcache") os.mkdir(pip_cache_dir) extractor = WheelCacheExtractor(pip_cache_dir) self.assertEqual(list(extractor.iter_cache()), [])