Browse Source

[tests] Remove global_setup function

rtmp_test
Philipp Hagemeister 11 years ago
parent
commit
d0efb9ec9a
9 changed files with 6 additions and 21 deletions
  1. +0
    -4
      test/helper.py
  2. +1
    -2
      test/test_age_restriction.py
  3. +0
    -2
      test/test_download.py
  4. +1
    -2
      test/test_playlists.py
  5. +1
    -2
      test/test_subtitles.py
  6. +1
    -2
      test/test_write_annotations.py
  7. +1
    -2
      test/test_write_info_json.py
  8. +1
    -2
      test/test_youtube_lists.py
  9. +0
    -3
      test/test_youtube_signature.py

+ 0
- 4
test/helper.py View File

@ -12,10 +12,6 @@ from youtube_dl import YoutubeDL
from youtube_dl.utils import preferredencoding from youtube_dl.utils import preferredencoding
def global_setup():
youtube_dl._setup_opener(timeout=10)
def get_params(override=None): def get_params(override=None):
PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"parameters.json") "parameters.json")


+ 1
- 2
test/test_age_restriction.py View File

@ -6,8 +6,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import global_setup, try_rm
global_setup()
from test.helper import try_rm
from youtube_dl import YoutubeDL from youtube_dl import YoutubeDL


+ 0
- 2
test/test_download.py View File

@ -9,12 +9,10 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import ( from test.helper import (
get_params, get_params,
get_testcases, get_testcases,
global_setup,
try_rm, try_rm,
md5, md5,
report_warning report_warning
) )
global_setup()
import hashlib import hashlib


+ 1
- 2
test/test_playlists.py View File

@ -8,8 +8,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, global_setup
global_setup()
from test.helper import FakeYDL
from youtube_dl.extractor import ( from youtube_dl.extractor import (


+ 1
- 2
test/test_subtitles.py View File

@ -6,8 +6,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, global_setup, md5
global_setup()
from test.helper import FakeYDL, md5
from youtube_dl.extractor import ( from youtube_dl.extractor import (


+ 1
- 2
test/test_write_annotations.py View File

@ -7,8 +7,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import get_params, global_setup, try_rm
global_setup()
from test.helper import get_params, try_rm
import io import io


+ 1
- 2
test/test_write_info_json.py View File

@ -7,8 +7,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import get_params, global_setup
global_setup()
from test.helper import get_params
import io import io


+ 1
- 2
test/test_youtube_lists.py View File

@ -6,8 +6,7 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, global_setup
global_setup()
from test.helper import FakeYDL
from youtube_dl.extractor import ( from youtube_dl.extractor import (


+ 0
- 3
test/test_youtube_signature.py View File

@ -6,9 +6,6 @@ import sys
import unittest import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import global_setup
global_setup()
import io import io
import re import re


Loading…
Cancel
Save