Skip to content

Commit

Permalink
Add test of using timespec on the playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera authored and mauricioabreu committed Nov 20, 2023
1 parent e19b882 commit 1d53f6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,13 @@ def test_dump_segment_honors_timespec():
assert "EXT-X-PROGRAM-DATE-TIME:2014-08-13T13:36:33.000000+00:00" in segment_text


def test_dump_honors_timespec():
obj = m3u8.M3U8(playlists.SIMPLE_PLAYLIST_WITH_PROGRAM_DATE_TIME)
obj_text = obj.dumps(timespec="microseconds").strip()

assert "EXT-X-PROGRAM-DATE-TIME:2014-08-13T13:36:33.000000+00:00" in obj_text


def test_dump_should_not_ignore_zero_duration():
obj = m3u8.M3U8(playlists.SIMPLE_PLAYLIST_WITH_ZERO_DURATION)

Expand Down

0 comments on commit 1d53f6f

Please sign in to comment.