mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[test_utils] Do not use dash in env variables' names
This commit is contained in:
parent
41c5e60dd5
commit
a426ef6d78
|
@ -221,12 +221,12 @@ class TestUtil(unittest.TestCase):
|
||||||
def env(var):
|
def env(var):
|
||||||
return '%{0}%'.format(var) if sys.platform == 'win32' else '${0}'.format(var)
|
return '%{0}%'.format(var) if sys.platform == 'win32' else '${0}'.format(var)
|
||||||
|
|
||||||
compat_setenv('YOUTUBE-DL-EXPATH-PATH', 'expanded')
|
compat_setenv('YOUTUBE_DL_EXPATH_PATH', 'expanded')
|
||||||
self.assertEqual(expand_path(env('YOUTUBE-DL-EXPATH-PATH')), 'expanded')
|
self.assertEqual(expand_path(env('YOUTUBE_DL_EXPATH_PATH')), 'expanded')
|
||||||
self.assertEqual(expand_path(env('HOMEPATH')), compat_getenv('HOMEPATH'))
|
self.assertEqual(expand_path(env('HOME')), compat_getenv('HOME'))
|
||||||
self.assertEqual(expand_path('~'), compat_getenv('HOME'))
|
self.assertEqual(expand_path('~'), compat_getenv('HOME'))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
expand_path('~/%s' % env('YOUTUBE-DL-EXPATH-PATH')),
|
expand_path('~/%s' % env('YOUTUBE_DL_EXPATH_PATH')),
|
||||||
'%s/expanded' % compat_getenv('HOME'))
|
'%s/expanded' % compat_getenv('HOME'))
|
||||||
|
|
||||||
def test_prepend_extension(self):
|
def test_prepend_extension(self):
|
||||||
|
|
Loading…
Reference in a new issue