コード例 #1
0
ファイル: test_basedir.py プロジェクト: jckdotim/geofront-cli
 def test_default_cache_home(self):
     """Ensure default values work correctly."""
     self.tweak_env('XDG_CACHE_HOME', None)
     expected = b'/blah'
     self.patch(basedir, 'default_cache_home', expected)
     self.assertFalse(os.environ.get('XDG_CACHE_HOME', False))
     self.assertEqual(basedir.get_xdg_cache_home(), expected)
コード例 #2
0
 def test_default_cache_home(self):
     """Ensure default values work correctly."""
     self.tweak_env('XDG_CACHE_HOME', None)
     expected = b'/blah'
     self.patch(basedir, 'default_cache_home', expected)
     self.assertFalse(os.environ.get('XDG_CACHE_HOME', False))
     self.assertEqual(basedir.get_xdg_cache_home(), expected)
コード例 #3
0
 def test_cache_home(self):
     """Test that XDG_CACHE_HOME is handled correctly."""
     self.tweak_env(
         'XDG_CACHE_HOME',
         os.path.abspath(os.path.join(os.getcwd(), '_trial_temp', 'cache')))
     self.assertEqual(os.environ['XDG_CACHE_HOME'].encode('utf-8'),
                      basedir.get_xdg_cache_home())
コード例 #4
0
ファイル: test_basedir.py プロジェクト: jckdotim/geofront-cli
 def test_cache_home(self):
     """Test that XDG_CACHE_HOME is handled correctly."""
     self.tweak_env('XDG_CACHE_HOME',
                    os.path.abspath(os.path.join(os.getcwd(),
                                                 '_trial_temp',
                                                 'cache')))
     self.assertEqual(os.environ['XDG_CACHE_HOME'].encode('utf-8'),
                      basedir.get_xdg_cache_home())