def test_cache_base(self): actual = get_cache_base() if os.name == 'nt' and 'LOCALAPPDATA' in os.environ: expected = os.path.expandvars('$localappdata') else: expected = os.path.expanduser('~') expected = os.path.join(expected, '.distlib') self.assertEqual(expected, actual) self.assertTrue(os.path.isdir(expected))
def test_base(self): cache = Cache() expected = os.path.join(get_cache_base(), 'resource-cache') self.assertEqual(expected, cache.base) self.assertTrue(os.path.isdir(expected))
def test_base(self): cache = ResourceCache() expected = os.path.join(get_cache_base(), str('resource-cache')) self.assertEqual(expected, cache.base) self.assertTrue(os.path.isdir(expected))