X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=youtube-dl;a=blobdiff_plain;f=test%2Ftest_execution.py;h=11661bb68148f4eb229b50c37f67dc744491c7df;hp=f31e51558abe7990a520c93b9e834753e402ca59;hb=6cd452acffe8d79c895a2ebd0346e2ba7f9e112f;hpb=f5e2efbbf0a4a1fa02df09a12ce9ec69970ab14c diff --git a/test/test_execution.py b/test/test_execution.py index f31e51558..11661bb68 100644 --- a/test/test_execution.py +++ b/test/test_execution.py @@ -8,6 +8,9 @@ import unittest import sys import os import subprocess +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from youtube_dl.utils import encodeArgument rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -31,10 +34,11 @@ class TestExecution(unittest.TestCase): def test_cmdline_umlauts(self): p = subprocess.Popen( - [sys.executable, 'youtube_dl/__main__.py', 'ä', '--version'], + [sys.executable, 'youtube_dl/__main__.py', encodeArgument('ä'), '--version'], cwd=rootDir, stdout=_DEV_NULL, stderr=subprocess.PIPE) _, stderr = p.communicate() self.assertFalse(stderr) + if __name__ == '__main__': unittest.main()