4
4
import pytest
5
5
6
6
import streamlink_cli .main
7
- from streamlink .exceptions import StreamError , StreamlinkDeprecationWarning
7
+ from streamlink .exceptions import StreamError
8
8
from streamlink .stream .stream import Stream
9
9
from streamlink_cli .exceptions import StreamlinkCLIError
10
10
from streamlink_cli .main import build_parser , setup_args
@@ -67,27 +67,23 @@ def test_stream_failure_no_output_open(
67
67
68
68
69
69
@pytest .mark .parametrize (
70
- ("argv" , "isatty" , "deprecation" , " expected" ),
70
+ ("argv" , "isatty" , "expected" ),
71
71
[
72
- pytest .param (["--retry-open=1" , "--progress=yes" ], True , False , True , id = "progress-tty" ),
73
- pytest .param (["--retry-open=1" , "--progress=no" ], True , False , False , id = "no-progress-tty" ),
74
- pytest .param (["--retry-open=1" , "--progress=yes" ], False , False , False , id = "progress-no-tty" ),
75
- pytest .param (["--retry-open=1" , "--progress=no" ], False , False , False , id = "no-progress-no-tty" ),
76
- pytest .param (["--retry-open=1" , "--progress=force" ], False , False , True , id = "force-progress-no-tty" ),
77
- pytest .param (["--retry-open=1" , "--progress=yes" , "--force-progress" ], False , True , True , id = "force-progress-yes" ),
78
- pytest .param (["--retry-open=1" , "--progress=no" , "--force-progress" ], False , True , True , id = "force-progress-no" ),
72
+ pytest .param (["--retry-open=1" , "--progress=yes" ], True , True , id = "progress-tty" ),
73
+ pytest .param (["--retry-open=1" , "--progress=no" ], True , False , id = "no-progress-tty" ),
74
+ pytest .param (["--retry-open=1" , "--progress=yes" ], False , False , id = "progress-no-tty" ),
75
+ pytest .param (["--retry-open=1" , "--progress=no" ], False , False , id = "no-progress-no-tty" ),
76
+ pytest .param (["--retry-open=1" , "--progress=force" ], False , True , id = "force-progress-no-tty" ),
79
77
],
80
78
indirect = ["argv" ],
81
79
)
82
80
def test_show_progress (
83
81
monkeypatch : pytest .MonkeyPatch ,
84
82
caplog : pytest .LogCaptureFixture ,
85
- recwarn : pytest .WarningsRecorder ,
86
83
argv : list ,
87
84
output : Mock ,
88
85
stream : Stream ,
89
86
isatty : bool ,
90
- deprecation : bool ,
91
87
expected : bool ,
92
88
):
93
89
streamio = BytesIO (b"0" * 8192 * 2 )
@@ -103,8 +99,4 @@ def test_show_progress(
103
99
("debug" , "main" , "Pre-buffering 8192 bytes" ),
104
100
("debug" , "main" , "Writing stream to output" ),
105
101
]
106
- assert [(record .category , str (record .message )) for record in recwarn .list ] == ([(
107
- StreamlinkDeprecationWarning ,
108
- "The --force-progress option has been deprecated in favor of --progress=force" ,
109
- )] if deprecation else [])
110
102
assert mock_streamrunner .call_args_list == [call (streamio , output , show_progress = expected )]
0 commit comments