mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
correction on the test for the utils.py
This commit is contained in:
parent
434d60cd95
commit
80a846e119
|
@ -22,13 +22,12 @@ def test_sanitize_filename(self):
|
||||||
|
|
||||||
self.assertEqual(sanitize_filename(u'123'), u'123')
|
self.assertEqual(sanitize_filename(u'123'), u'123')
|
||||||
|
|
||||||
self.assertNotIn(u'/', sanitize_filename(u'abc/de'))
|
self.assertEqual(u'abc_de', sanitize_filename(u'abc/de'))
|
||||||
self.assertNotIn(u'abc', sanitize_filename(u'abc/de'))
|
|
||||||
self.assertIn(u'de', sanitize_filename(u'abc/de'))
|
self.assertIn(u'de', sanitize_filename(u'abc/de'))
|
||||||
self.assertNotIn(u'/', sanitize_filename(u'abc/de///'))
|
self.assertNotIn(u'/', sanitize_filename(u'abc/de///'))
|
||||||
|
|
||||||
self.assertIn(u'\\', sanitize_filename(u'abc\\de'))
|
self.assertEqual(u'abc_de', sanitize_filename(u'abc\\de'))
|
||||||
self.assertIn(u'abc', sanitize_filename(u'abc\\de'))
|
self.assertEqual(u'abc_de', sanitize_filename(u'abc\\de'))
|
||||||
self.assertIn(u'de', sanitize_filename(u'abc\\de'))
|
self.assertIn(u'de', sanitize_filename(u'abc\\de'))
|
||||||
|
|
||||||
self.assertEqual(sanitize_filename(u'ä'), u'ä')
|
self.assertEqual(sanitize_filename(u'ä'), u'ä')
|
||||||
|
@ -43,6 +42,5 @@ def test_ordered_set(self):
|
||||||
|
|
||||||
def test_unescape_html(self):
|
def test_unescape_html(self):
|
||||||
self.assertEqual(unescapeHTML(u"%20;"), u"%20;")
|
self.assertEqual(unescapeHTML(u"%20;"), u"%20;")
|
||||||
self.assertEqual(unescapeHTML(u"gre&tre&yre"), [u'gre', u'tre', u'yre'])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue