Exemplo n.º 1
0
 def test_compat_expanduser(self):
     old_home = os.environ.get('HOME')
     test_str = R'C:\Documents and Settings\тест\Application Data'
     try:
         compat_setenv('HOME', test_str)
         self.assertEqual(compat_expanduser('~'), test_str)
     finally:
         compat_setenv('HOME', old_home or '')
Exemplo n.º 2
0
 def test_compat_setenv(self):
     test_var = 'yt_dlp_COMPAT_SETENV'
     test_str = 'тест'
     compat_setenv(test_var, test_str)
     compat_getenv(test_var)
     self.assertEqual(compat_getenv(test_var), test_str)
Exemplo n.º 3
0
 def test_compat_getenv(self):
     test_str = 'тест'
     compat_setenv('yt_dlp_COMPAT_GETENV', test_str)
     self.assertEqual(compat_getenv('yt_dlp_COMPAT_GETENV'), test_str)