diff options
author | dirkf <fieldhouse@gmx.net> | 2023-07-13 20:14:50 +0100 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2023-07-18 10:50:46 +0100 |
commit | 1d8d5a93f7187438587c3a754b53fdf30322cef0 (patch) | |
tree | 742e29d44245efcb5db44a0a5e70b5c9675c4074 /test/helper.py | |
parent | 1634b1d61efa36c31c86b8c64c88dc297a7af28a (diff) | |
download | youtube-dl-1d8d5a93f7187438587c3a754b53fdf30322cef0.tar.xz |
[test] Fixes for old Pythons
Diffstat (limited to 'test/helper.py')
-rw-r--r-- | test/helper.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/helper.py b/test/helper.py index e3314b03e..aa99001b2 100644 --- a/test/helper.py +++ b/test/helper.py @@ -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 |