mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-24 11:11:54 +00:00
[test/test_execution.py] Use compat_subprocess_get_DEVNULL()
This commit is contained in:
parent
7bce2ad441
commit
44faa71b19
1 changed files with 2 additions and 5 deletions
|
@ -10,17 +10,14 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
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 youtube_dl.compat import compat_register_utf8
|
from youtube_dl.compat import compat_register_utf8, compat_subprocess_get_DEVNULL
|
||||||
from youtube_dl.utils import encodeArgument
|
from youtube_dl.utils import encodeArgument
|
||||||
|
|
||||||
compat_register_utf8()
|
compat_register_utf8()
|
||||||
|
|
||||||
rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
try:
|
_DEV_NULL = compat_subprocess_get_DEVNULL()
|
||||||
_DEV_NULL = subprocess.DEVNULL
|
|
||||||
except AttributeError:
|
|
||||||
_DEV_NULL = open(os.devnull, 'wb')
|
|
||||||
|
|
||||||
|
|
||||||
class TestExecution(unittest.TestCase):
|
class TestExecution(unittest.TestCase):
|
||||||
|
|
Loading…
Reference in a new issue