Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Aug 6, 2024
1 parent 1b19289 commit f9360bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion m3u8/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _parse_attribute_list(prefix, line, attribute_parser, default_parser=None):
params = ATTRIBUTELISTPATTERN.split(line.replace(prefix + ":", ""))[1::2]

attributes = {}
if not line.startswith(prefix+':') :
if not line.startswith(prefix + ":"):
return attributes

for param in params:
Expand Down
8 changes: 4 additions & 4 deletions tests/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
http://media.example.com/fileSequence52-3.ts
"""

PLAYLIST_WITH_CUSTOM_MEDIA_HEADER = '''#EXTM3U
PLAYLIST_WITH_TAG_MEDIA_READY = """#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:1
Expand All @@ -108,9 +108,9 @@
https://cdn.example.com/vod/hash:XXX/file.mp4/media-1.ts
#EXTINF:6.28,
https://cdn.example.com/vod/hash:XXX/file.mp4/media-2.ts
'''
"""

PLAYLIST_WITH_SESSION_ENCRYPTED_SEGMENTS = '''
PLAYLIST_WITH_SESSION_ENCRYPTED_SEGMENTS = """
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:7794
#EXT-X-TARGETDURATION:15
Expand All @@ -123,7 +123,7 @@
http://media.example.com/fileSequence52-2.ts
#EXTINF:15,
http://media.example.com/fileSequence52-3.ts
'''
"""

VARIANT_PLAYLIST = """
#EXTM3U
Expand Down
4 changes: 2 additions & 2 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ def test_session_key_attribute_without_initialization_vector():
assert None is obj.session_keys[0].iv


def test_parse_custom_media_header():
obj = m3u8.M3U8(playlists.PLAYLIST_WITH_CUSTOM_MEDIA_HEADER)
def test_parse_tag_name_matches_fully():
assert m3u8.M3U8(playlists.PLAYLIST_WITH_TAG_MEDIA_READY)


def test_segments_attribute():
Expand Down

0 comments on commit f9360bd

Please sign in to comment.