mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 19:12:40 +01:00
Move no_convert force test to cli test class
This commit is contained in:
parent
aecf593ede
commit
f74dd89256
1 changed files with 15 additions and 15 deletions
|
|
@ -270,6 +270,21 @@ class ConvertCliTest(ConvertTestCase, ConvertCommand):
|
|||
self.run_convert("--playlist", "playlist.m3u8", "--pretend")
|
||||
assert not (self.convert_dest / "playlist.m3u8").exists()
|
||||
|
||||
def test_force_overrides_no_convert(self):
|
||||
self.config["convert"]["formats"]["opus"] = {
|
||||
"command": self.tagged_copy_cmd("opus"),
|
||||
"extension": "ops",
|
||||
}
|
||||
self.config["convert"]["no_convert"] = "format:ogg"
|
||||
|
||||
[item] = self.add_item_fixtures(ext="ogg")
|
||||
|
||||
with control_stdin("y"):
|
||||
self.run_convert_path(item, "--format", "opus", "--force")
|
||||
|
||||
converted = self.convert_dest / "converted.ops"
|
||||
assert self.file_endswith(converted, "opus")
|
||||
|
||||
|
||||
@_common.slow_test()
|
||||
class NeverConvertLossyFilesTest(ConvertTestCase, ConvertCommand):
|
||||
|
|
@ -324,21 +339,6 @@ class NeverConvertLossyFilesTest(ConvertTestCase, ConvertCommand):
|
|||
converted = self.convert_dest / "converted.ops"
|
||||
assert self.file_endswith(converted, "opus")
|
||||
|
||||
def test_force_overrides_no_convert(self):
|
||||
self.config["convert"]["formats"]["opus"] = {
|
||||
"command": self.tagged_copy_cmd("opus"),
|
||||
"extension": "ops",
|
||||
}
|
||||
self.config["convert"]["no_convert"] = "format:ogg"
|
||||
|
||||
[item] = self.add_item_fixtures(ext="ogg")
|
||||
|
||||
with control_stdin("y"):
|
||||
self.run_convert_path(item, "--format", "opus", "--force")
|
||||
|
||||
converted = self.convert_dest / "converted.ops"
|
||||
assert self.file_endswith(converted, "opus")
|
||||
|
||||
|
||||
class TestNoConvert:
|
||||
"""Test the effect of the `no_convert` option."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue