mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
14 lines
456 B
Python
14 lines
456 B
Python
from twitchdl.utils import titlify, slugify
|
|
|
|
|
|
def test_titlify():
|
|
assert titlify("Foo Bar Baz.") == "Foo Bar Baz."
|
|
assert titlify("Foo (Bar) [Baz]") == "Foo (Bar) [Baz]"
|
|
assert titlify("Foo@{} Bar Baz!\"#$%&/=?*+'🔪") == "Foo Bar Baz"
|
|
|
|
|
|
def test_slugify():
|
|
assert slugify("Foo Bar Baz") == "foo_bar_baz"
|
|
assert slugify(" Foo Bar Baz ") == "foo_bar_baz"
|
|
assert slugify("Foo@{}[] Bar Baz!\"#$%&/()=?*+'🔪") == "foo_bar_baz"
|