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.
This commit is contained in:
Jon Dufresne
2018-12-15 15:43:44 -08:00
parent 6113261948
commit 5bf25eb445
18 changed files with 37 additions and 37 deletions

View File

@@ -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',