mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 05:14:02 -07:00
[test] Fixes for old Pythons
This commit is contained in:
parent
1634b1d61e
commit
1d8d5a93f7
6 changed files with 30 additions and 15 deletions
|
@ -9,6 +9,7 @@ import re
|
|||
import types
|
||||
import ssl
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import youtube_dl.extractor
|
||||
from youtube_dl import YoutubeDL
|
||||
|
@ -17,6 +18,7 @@ from youtube_dl.compat import (
|
|||
compat_str,
|
||||
)
|
||||
from youtube_dl.utils import (
|
||||
IDENTITY,
|
||||
preferredencoding,
|
||||
write_string,
|
||||
)
|
||||
|
@ -298,3 +300,7 @@ def http_server_port(httpd):
|
|||
else:
|
||||
sock = httpd.socket
|
||||
return sock.getsockname()[1]
|
||||
|
||||
|
||||
def expectedFailureIf(cond):
|
||||
return unittest.expectedFailure if cond else IDENTITY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue