diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 23:02:28 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-16 21:28:51 +0900 |
commit | c6bd84a61467a5a60adb11af7b5a7b99ac591fbf (patch) | |
tree | 239ba4d0bba3e6bf925af917d7c6d219ae1a6f64 /tests/test_quickstart.py | |
parent | d160adb8118ebe19ee74b3fbd55478490c473ed8 (diff) | |
download | sphinx-git-c6bd84a61467a5a60adb11af7b5a7b99ac591fbf.tar.gz |
refactor: Remove u-prefix from strings
Diffstat (limited to 'tests/test_quickstart.py')
-rw-r--r-- | tests/test_quickstart.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 5905ae835..ad36faca7 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -92,16 +92,16 @@ def test_do_prompt_inputstrip(): def test_do_prompt_with_nonascii(): answers = { - 'Q1': u'\u30c9\u30a4\u30c4', + 'Q1': '\u30c9\u30a4\u30c4', } qs.term_input = mock_input(answers) try: - result = qs.do_prompt('Q1', default=u'\u65e5\u672c') + result = qs.do_prompt('Q1', default='\u65e5\u672c') except UnicodeEncodeError: raise pytest.skip.Exception( 'non-ASCII console input not supported on this encoding: %s', qs.TERM_ENCODING) - assert result == u'\u30c9\u30a4\u30c4' + assert result == '\u30c9\u30a4\u30c4' def test_quickstart_defaults(tempdir): @@ -145,8 +145,8 @@ def test_quickstart_all_answers(tempdir): 'Root path': tempdir, 'Separate source and build': 'y', 'Name prefix for templates': '.', - 'Project name': u'STASI™'.encode(), - 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode(), + 'Project name': 'STASI™'.encode(), + 'Author name': 'Wolfgang Schäuble & G\'Beckstein'.encode(), 'Project version': '2.0', 'Project release': '2.0.1', 'Project language': 'de', @@ -182,16 +182,16 @@ def test_quickstart_all_answers(tempdir): assert ns['templates_path'] == ['.templates'] assert ns['source_suffix'] == '.txt' assert ns['master_doc'] == 'contents' - assert ns['project'] == u'STASI™' - assert ns['copyright'] == u'%s, Wolfgang Schäuble & G\'Beckstein' % \ + assert ns['project'] == 'STASI™' + assert ns['copyright'] == '%s, Wolfgang Schäuble & G\'Beckstein' % \ time.strftime('%Y') assert ns['version'] == '2.0' assert ns['release'] == '2.0.1' assert ns['todo_include_todos'] is True assert ns['html_static_path'] == ['.static'] assert ns['latex_documents'] == [ - ('contents', 'STASI.tex', u'STASI™ Documentation', - u'Wolfgang Schäuble \\& G\'Beckstein', 'manual')] + ('contents', 'STASI.tex', 'STASI™ Documentation', + 'Wolfgang Schäuble \\& G\'Beckstein', 'manual')] assert (tempdir / 'build').isdir() assert (tempdir / 'source' / '.static').isdir() @@ -222,7 +222,7 @@ def test_generated_files_eol(tempdir): def test_quickstart_and_build(tempdir): answers = { 'Root path': tempdir, - 'Project name': u'Fullwidth characters: \u30c9\u30a4\u30c4', + 'Project name': 'Fullwidth characters: \u30c9\u30a4\u30c4', 'Author name': 'Georg Brandl', 'Project version': '0.1', } @@ -247,7 +247,7 @@ def test_quickstart_and_build(tempdir): def test_default_filename(tempdir): answers = { 'Root path': tempdir, - 'Project name': u'\u30c9\u30a4\u30c4', # Fullwidth characters only + 'Project name': '\u30c9\u30a4\u30c4', # Fullwidth characters only 'Author name': 'Georg Brandl', 'Project version': '0.1', } |