diff options
author | gcmalloc <gcmalloc@gmail.com> | 2012-10-15 14:34:54 +0200 |
---|---|---|
committer | gcmalloc <gcmalloc@gmail.com> | 2012-10-19 12:53:20 +0200 |
commit | 4279a0ca983476a0bdf86e23251b866616cbd434 (patch) | |
tree | 4332325011d9eed515465aedd3132c22dd94d291 /test/test_utils.py | |
parent | edcc7d2dd370c74bac3f28d9445f61b3fb590c7e (diff) |
correcting test to be compatible with python2.6
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index fd3ac4d46..eb0af703f 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -13,8 +13,8 @@ from youtube_dl.utils import orderedSet class TestUtil(unittest.TestCase): def test_timeconvert(self): - self.assertIsNone(timeconvert('')) - self.assertIsNone(timeconvert('bougrg')) + self.assertTrue(timeconvert('') is None) + self.assertTrue(timeconvert('bougrg') is None) def test_sanitize_filename(self): self.assertEqual(sanitize_filename(u'abc'), u'abc') @@ -23,12 +23,12 @@ class TestUtil(unittest.TestCase): 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.assertTrue(u'de' in sanitize_filename(u'abc/de')) + self.assertFalse(u'/' in 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.assertTrue(u'de' in sanitize_filename(u'abc\\de')) self.assertEqual(sanitize_filename(u'ä'), u'ä') self.assertEqual(sanitize_filename(u'кириллица'), u'кириллица') |