Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 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))
Beispiel #4
0
 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))