mirror of
https://github.com/beetbox/beets.git
synced 2026-03-27 07:43:38 +01:00
Add a unit test for playlist file extension
This commit is contained in:
parent
dad1b2e4e1
commit
953cb75712
1 changed files with 11 additions and 0 deletions
|
|
@ -293,6 +293,17 @@ class ConvertCliTest(ConvertTestCase, ConvertCommand):
|
|||
m3u_created = os.path.join(self.convert_dest, b"playlist.m3u8")
|
||||
assert not os.path.exists(m3u_created)
|
||||
|
||||
def test_playlist_ext(self):
|
||||
"""Test correct extension of file inside the playlist when format conversion occurs."""
|
||||
# We expect a converted file with the MP3 extension.
|
||||
self.config["convert"]["format"] = "mp3"
|
||||
with control_stdin("y"):
|
||||
self.run_convert("--playlist", "playlist.m3u8")
|
||||
# Check playlist content.
|
||||
m3u_created = os.path.join(self.convert_dest, b"playlist.m3u8")
|
||||
with open(m3u_created, "r") as m3u_file:
|
||||
self.assertTrue(m3u_file.readline() == "#EXTM3U\n")
|
||||
self.assertTrue(m3u_file.readline() == "converted.mp3\n")
|
||||
|
||||
@_common.slow_test()
|
||||
class NeverConvertLossyFilesTest(ConvertTestCase, ConvertCommand):
|
||||
|
|
|
|||
Loading…
Reference in a new issue