diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-15 15:43:44 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-15 17:19:56 -0800 |
commit | 5bf25eb44529cb0546b9b690a142ca7529a062f0 (patch) | |
tree | 13ae675ba4ec81e0eb0b39c71c114124affbfadc /tests/test_quickstart.py | |
parent | 6113261948523ef6cad74621dec10e0cbf0189c7 (diff) | |
download | sphinx-git-5bf25eb44529cb0546b9b690a142ca7529a062f0.tar.gz |
Avoid respecifying default encoding for .encode()/.decode() calls
In Python 3, both .encode() and .decode() default the encoding to
'utf-8'. See the docs:
https://docs.python.org/3/library/stdtypes.html#str.encode
https://docs.python.org/3/library/stdtypes.html#bytes.decode
Simplify and shorten the code by using the default instead of
respecifying it.
Diffstat (limited to 'tests/test_quickstart.py')
-rw-r--r-- | tests/test_quickstart.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 248b91d64..5905ae835 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -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('utf-8'), - 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode('utf-8'), + 'Project name': u'STASI™'.encode(), + 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode(), 'Project version': '2.0', 'Project release': '2.0.1', 'Project language': 'de', |