def test_compat_setenv(self): test_var = 'YOUTUBE_DL_COMPAT_SETENV' test_str = 'тест' compat_setenv(test_var, test_str) compat_getenv(test_var) self.assertEqual(compat_getenv(test_var), test_str)
def test_compat_getenv(self): test_str = 'тест' os.environ['YOUTUBE-DL-TEST'] = ( test_str if sys.version_info >= (3, 0) else test_str.encode(get_filesystem_encoding())) self.assertEqual(compat_getenv('YOUTUBE-DL-TEST'), test_str)
def test_compat_getenv(self): test_str = 'тест' compat_setenv('YOUTUBE_DL_COMPAT_GETENV', test_str) self.assertEqual(compat_getenv('YOUTUBE_DL_COMPAT_GETENV'), test_str)
def test_compat_getenv(self): test_str = 'тест' compat_setenv('YOUTUBE-DL-TEST', test_str) self.assertEqual(compat_getenv('YOUTUBE-DL-TEST'), test_str)
def test_compat_setenv(self): test_var = 'YOUTUBE-DL-TEST' test_str = 'тест' compat_setenv(test_var, test_str) compat_getenv(test_var) self.assertEqual(compat_getenv(test_var), test_str)
def test_compat_getenv(self): test_str = 'тест' os.environ['YOUTUBE-DL-TEST'] = (test_str if sys.version_info >= (3, 0) else test_str.encode( get_filesystem_encoding())) self.assertEqual(compat_getenv('YOUTUBE-DL-TEST'), test_str)
def test_compat_setenv(self): test_var = 'youtube_dl_COMPAT_SETENV' test_str = 'тест' compat_setenv(test_var, test_str) compat_getenv(test_var) self.assertEqual(compat_getenv(test_var), test_str)
def test_compat_getenv(self): test_str = 'тест' compat_setenv('youtube_dl_COMPAT_GETENV', test_str) self.assertEqual(compat_getenv('youtube_dl_COMPAT_GETENV'), test_str)