diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-11-26 20:01:20 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-11-26 20:01:22 +0100 |
commit | dcddc10a5032996474e157946b00b8df039eebda (patch) | |
tree | c0203ee3349bcae04bab970657e391f4fc255736 /test/test_write_info_json.py | |
parent | a1008af412f51aac82c121eaed07f742055d010b (diff) |
[test_unicode_literals] Arm unicode_literals check
From now on, the line
from __future__ import unicode_literals
should be contained in every single Python file lest we run into any more 2.x/3.x issues.
Going forward, we're likely to develop on 3.x only and would likely miss subtle bugs otherwise.
Diffstat (limited to 'test/test_write_info_json.py')
-rw-r--r-- | test/test_write_info_json.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_write_info_json.py b/test/test_write_info_json.py index 90426a559..0396ef262 100644 --- a/test/test_write_info_json.py +++ b/test/test_write_info_json.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # coding: utf-8 +from __future__ import unicode_literals # Allow direct execution import os @@ -32,7 +33,7 @@ params = get_params({ TEST_ID = 'BaW_jenozKc' INFO_JSON_FILE = TEST_ID + '.info.json' DESCRIPTION_FILE = TEST_ID + '.mp4.description' -EXPECTED_DESCRIPTION = u'''test chars: "'/\ä↭𝕐 +EXPECTED_DESCRIPTION = '''test chars: "'/\ä↭𝕐 test URL: https://github.com/rg3/youtube-dl/issues/1892 This is a test video for youtube-dl. @@ -53,11 +54,11 @@ class TestInfoJSON(unittest.TestCase): self.assertTrue(os.path.exists(INFO_JSON_FILE)) with io.open(INFO_JSON_FILE, 'r', encoding='utf-8') as jsonf: jd = json.load(jsonf) - self.assertEqual(jd['upload_date'], u'20121002') + self.assertEqual(jd['upload_date'], '20121002') self.assertEqual(jd['description'], EXPECTED_DESCRIPTION) self.assertEqual(jd['id'], TEST_ID) self.assertEqual(jd['extractor'], 'youtube') - self.assertEqual(jd['title'], u'''youtube-dl test video "'/\ä↭𝕐''') + self.assertEqual(jd['title'], '''youtube-dl test video "'/\ä↭𝕐''') self.assertEqual(jd['uploader'], 'Philipp Hagemeister') self.assertTrue(os.path.exists(DESCRIPTION_FILE)) |