sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from youtube_dl import YoutubeDL
-from helper import try_rm
+from .helper import try_rm
def _download_restricted(url, filename, age):
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from youtube_dl.extractor import YoutubeIE, YoutubePlaylistIE, YoutubeChannelIE, JustinTVIE, gen_extractors
-from helper import get_testcases
+from .helper import get_testcases
class TestAllURLsMatching(unittest.TestCase):
def setUp(self):
from youtube_dl.extractor import DailymotionIE
from youtube_dl.utils import *
-from helper import FakeYDL
+from .helper import FakeYDL
md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest()
with open(fn, 'rb') as f:
return hashlib.md5(f.read()).hexdigest()
-import helper # Set up remaining global configuration
-from helper import get_testcases, try_rm
+import test.helper as helper # Set up remaining global configuration
+from .helper import get_testcases, try_rm
defs = get_testcases()
with io.open(PARAMETERS_FILE, encoding='utf-8') as pf:
)
from youtube_dl.utils import *
-from helper import FakeYDL
+from .helper import FakeYDL
class TestPlaylists(unittest.TestCase):
def assertIsPlaylist(self, info):
from youtube_dl.extractor import YoutubeUserIE, YoutubePlaylistIE, YoutubeIE, YoutubeChannelIE, YoutubeShowIE
from youtube_dl.utils import *
-from helper import FakeYDL
+from .helper import FakeYDL
class TestYoutubeLists(unittest.TestCase):
def assertIsPlaylist(self,info):
from youtube_dl.extractor import YoutubeIE
from youtube_dl.utils import *
-from helper import FakeYDL
+from .helper import FakeYDL
md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest()
[tox]
envlist = py26,py27,py33
[testenv]
-deps = nose
-commands = nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose test
+deps =
+ nose
+ coverage
+commands = nosetests --verbose {posargs:test} # --with-coverage --cover-package=youtube_dl --cover-html
+ # test.test_download:TestDownload.test_NowVideo