Skip to content

Commit

Permalink
add test for no_convert when using OR query
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpoChew committed Oct 26, 2024
1 parent d1c88bb commit a73919b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/plugins/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def test_no_transcode_when_no_convert_set(self):
converted = os.path.join(self.convert_dest, b"converted.mp3")
self.assertFalse(os.path.exists(converted))

def test_no_transcode_when_multi_no_convert_set(self):
def test_no_transcode_when_and_query_no_convert_set(self):
self.config["convert"]["no_convert"] = "format:OGG bitrate:..256"
[item] = self.add_item_fixtures(ext="ogg")
item.bitrate = 128
Expand All @@ -372,7 +372,7 @@ def test_no_transcode_when_multi_no_convert_set(self):
converted = os.path.join(self.convert_dest, b"converted.mp3")
self.assertFalse(os.path.exists(converted))

def test_transcode_when_multi_no_convert_set_partial_match(self):
def test_transcode_when_and_query_no_convert_set_partial_match(self):
self.config["convert"]["no_convert"] = "format:OGG bitrate:..256"
[item] = self.add_item_fixtures(ext="ogg")
item.bitrate = 320
Expand All @@ -381,3 +381,13 @@ def test_transcode_when_multi_no_convert_set_partial_match(self):
self.run_convert_path(item.path)
converted = os.path.join(self.convert_dest, b"converted.mp3")
self.assertTrue(os.path.exists(converted))

def test_no_transcode_when_or_query_no_convert_set_partial_match(self):
self.config["convert"]["no_convert"] = "format:OGG , bitrate:..256"
[item] = self.add_item_fixtures(ext="ogg")
item.bitrate = 320
item.store()
with control_stdin("y"):
self.run_convert_path(item.path)
converted = os.path.join(self.convert_dest, b"converted.mp3")
self.assertFalse(os.path.exists(converted))

0 comments on commit a73919b

Please sign in to comment.