aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorgcmalloc <gcmalloc@gmail.com>2012-10-03 14:25:54 +0200
committergcmalloc <gcmalloc@gmail.com>2012-10-12 20:25:22 +0200
commit137c5803c35f3e06d821ede1ef69733c3b8d338c (patch)
tree8bcc0e4902357145946e972c8814a6a65e6174f2 /test/test_utils.py
parent3eec021a1f4116a5ac0e0a9d4adeecb6a5d816ec (diff)
some changes to keep the same standard
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py48
1 files changed, 23 insertions, 25 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 910fcfad4..fd3ac4d46 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -12,35 +12,33 @@ from youtube_dl.utils import orderedSet
class TestUtil(unittest.TestCase):
- def test_timeconvert(self):
- self.assertIsNone(timeconvert(''))
- self.assertIsNone(timeconvert('bougrg'))
+ def test_timeconvert(self):
+ self.assertIsNone(timeconvert(''))
+ self.assertIsNone(timeconvert('bougrg'))
- def test_sanitize_filename(self):
- self.assertEqual(sanitize_filename(u'abc'), u'abc')
- self.assertEqual(sanitize_filename(u'abc_d-e'), u'abc_d-e')
+ def test_sanitize_filename(self):
+ self.assertEqual(sanitize_filename(u'abc'), u'abc')
+ self.assertEqual(sanitize_filename(u'abc_d-e'), u'abc_d-e')
- self.assertEqual(sanitize_filename(u'123'), u'123')
+ self.assertEqual(sanitize_filename(u'123'), u'123')
- self.assertEqual(u'abc_de', sanitize_filename(u'abc/de'))
- self.assertIn(u'de', sanitize_filename(u'abc/de'))
- self.assertNotIn(u'/', 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.assertNotIn(u'/', sanitize_filename(u'abc/de///'))
- self.assertEqual(u'abc_de', 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.assertEqual(u'abc_de', 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.assertEqual(sanitize_filename(u'ä'), u'ä')
- self.assertEqual(sanitize_filename(u'кириллица'), u'кириллица')
-
- def test_ordered_set(self):
- self.assertEqual(orderedSet([1,1,2,3,4,4,5,6,7,3,5]), [1,2,3,4,5,6,7])
- self.assertEqual(orderedSet([]), [])
- self.assertEqual(orderedSet([1]), [1])
- #keep the list ordered
- self.assertEqual(orderedSet([135,1,1,1]), [135,1])
-
- def test_unescape_html(self):
- self.assertEqual(unescapeHTML(u"%20;"), u"%20;")
+ self.assertEqual(sanitize_filename(u'ä'), u'ä')
+ self.assertEqual(sanitize_filename(u'кириллица'), u'кириллица')
+ def test_ordered_set(self):
+ self.assertEqual(orderedSet([1,1,2,3,4,4,5,6,7,3,5]), [1,2,3,4,5,6,7])
+ self.assertEqual(orderedSet([]), [])
+ self.assertEqual(orderedSet([1]), [1])
+ #keep the list ordered
+ self.assertEqual(orderedSet([135,1,1,1]), [135,1])
+ def test_unescape_html(self):
+ self.assertEqual(unescapeHTML(u"%20;"), u"%20;")