예제 #1
0
 def test_compat_expanduser(self):
     old_home = os.environ.get('HOME')
     test_str = r'C:\Documents and Settings\тест\Application Data'
     compat_setenv('HOME', test_str)
     self.assertEqual(compat_expanduser('~'), test_str)
     compat_setenv('HOME', old_home or '')
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 def test_compat_getenv(self):
     test_str = 'тест'
     compat_setenv('YOUTUBE-DL-TEST', test_str)
     self.assertEqual(compat_getenv('YOUTUBE-DL-TEST'), test_str)
예제 #5
0
 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)
예제 #6
0
	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)
예제 #7
0
	def test_compat_expanduser(self):
		old_home = os.environ.get('HOME')
		test_str = r'C:\Documents and Settings\тест\Application Data'
		compat_setenv('HOME', test_str)
		self.assertEqual(compat_expanduser('~'), test_str)
		compat_setenv('HOME', old_home or '')
예제 #8
0
	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)
예제 #9
0
 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)
예제 #10
0
 def test_compat_getenv(self):
     test_str = 'тест'
     compat_setenv('YOUTUBE-DL-TEST', test_str)
     self.assertEqual(compat_getenv('YOUTUBE-DL-TEST'), test_str)
예제 #11
0
 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)
예제 #12
0
 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)