diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-10-15 02:00:53 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-10-15 02:00:55 +0200 |
commit | 44a5f1718a5657a08082d8fd3201403bf2683c4f (patch) | |
tree | 97b83864087d2b6fd3696f785a764389b86d4d66 /test/test_youtube_signature.py | |
parent | a623df4c7b099bc3adfe943c7155e55c6512aeff (diff) |
Simplify tests
* Make them directly executable again
* Move common stuff (md5, parameters) to helper
* Never import *
* General clean up
Diffstat (limited to 'test/test_youtube_signature.py')
-rw-r--r-- | test/test_youtube_signature.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index 5007d9a16..5e1ff5eb0 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -1,14 +1,18 @@ #!/usr/bin/env python -import io -import re -import string +# Allow direct execution +import os import sys import unittest +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -# Allow direct execution -import os -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from test.helper import global_setup +global_setup() + + +import io +import re +import string from youtube_dl.extractor import YoutubeIE from youtube_dl.utils import compat_str, compat_urlretrieve |