Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions test/plugins/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,28 @@ def test_force_overrides(self, config_overrides):
assert self.file_endswith(converted, "opus")

@pytest.mark.parametrize(
"args,no_convert,expected_entry",
"args,no_convert,never_convert_lossy,expected_entry",
[
_p((), None, "converted.mp3", id="config-format"),
_p(("--format", "opus"), None, "converted.ops", id="cli-format"),
_p((), "format:ogg", "converted.ogg", id="not-transcoded"),
_p(("--keep-new",), None, "converted.ogg", id="keep-new"),
_p((), None, False, "converted.mp3", id="config-format"),
_p(
("--format", "opus"),
None,
False,
"converted.ops",
id="cli-format",
),
_p((), "format:ogg", False, "converted.ogg", id="not-transcoded"),
_p(("--keep-new",), None, False, "converted.ogg", id="keep-new"),
_p((), None, True, "converted.ogg", id="never-convert-lossy"),
],
)
def test_playlist_entry(self, args, no_convert, expected_entry):
def test_playlist_entry(
self, args, no_convert, never_convert_lossy, expected_entry
):
if no_convert:
self.config["convert"]["no_convert"] = no_convert
if never_convert_lossy:
self.config["convert"]["never_convert_lossy_files"] = True
Comment on lines 275 to +278

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove conditionals from both of these lines and set the values unconditionally


self.io.addinput("y")
self.run_convert(*args, "--playlist", "playlist.m3u8")
Expand Down
Loading