Skip to content

Commit

Permalink
Add a unit test for playlist file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreay committed Jul 3, 2024
1 parent 943b292 commit 02c8fc3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/plugins/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,17 @@ def test_playlist_pretend(self):
m3u_created = os.path.join(self.convert_dest, b"playlist.m3u8")
self.assertFalse(os.path.exists(m3u_created))

def test_playlist_ext(self):
"""Test correct extension of file inside the playlist when format conversion occurs."""

Check failure on line 312 in test/plugins/test_convert.py

View workflow job for this annotation

GitHub Actions / Check linting

line too long (95 > 88 characters)
# 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()

Check failure on line 323 in test/plugins/test_convert.py

View workflow job for this annotation

GitHub Actions / Check linting

expected 2 blank lines, found 1
class NeverConvertLossyFilesTest(_common.TestCase, TestHelper, ConvertCommand):
Expand Down

0 comments on commit 02c8fc3

Please sign in to comment.