aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2017-02-24 21:07:40 -0300
committerRogério Brito <rbrito@ime.usp.br>2017-02-24 21:07:40 -0300
commit4e090bc3ceacc4e3cd464d12ea97700e3acad37d (patch)
tree899b82420538d865e697fb071a03db254653e7c6 /devscripts
parent575f75429e2e479957d006a26940f4a5a51347ce (diff)
downloadyoutube-dl-4e090bc3ceacc4e3cd464d12ea97700e3acad37d.zip
youtube-dl-4e090bc3ceacc4e3cd464d12ea97700e3acad37d.tar.gz
youtube-dl-4e090bc3ceacc4e3cd464d12ea97700e3acad37d.tar.bz2
New upstream version 2017.02.24.1
Diffstat (limited to 'devscripts')
-rw-r--r--devscripts/make_lazy_extractors.py3
-rwxr-xr-xdevscripts/run_tests.sh21
2 files changed, 23 insertions, 1 deletions
diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py
index 19114d3..0a1762d 100644
--- a/devscripts/make_lazy_extractors.py
+++ b/devscripts/make_lazy_extractors.py
@@ -1,6 +1,7 @@
from __future__ import unicode_literals, print_function
from inspect import getsource
+import io
import os
from os.path import dirname as dirn
import sys
@@ -95,5 +96,5 @@ module_contents.append(
module_src = '\n'.join(module_contents) + '\n'
-with open(lazy_extractors_filename, 'wt') as f:
+with io.open(lazy_extractors_filename, 'wt', encoding='utf-8') as f:
f.write(module_src)
diff --git a/devscripts/run_tests.sh b/devscripts/run_tests.sh
new file mode 100755
index 0000000..6ba2672
--- /dev/null
+++ b/devscripts/run_tests.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+DOWNLOAD_TESTS="age_restriction|download|subtitles|write_annotations|iqiyi_sdk_interpreter|youtube_lists"
+
+test_set=""
+multiprocess_args=""
+
+case "$YTDL_TEST_SET" in
+ core)
+ test_set="-I test_($DOWNLOAD_TESTS)\.py"
+ ;;
+ download)
+ test_set="-I test_(?!$DOWNLOAD_TESTS).+\.py"
+ multiprocess_args="--processes=4 --process-timeout=540"
+ ;;
+ *)
+ break
+ ;;
+esac
+
+nosetests test --verbose $test_set $multiprocess_args