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_setup_command.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_setup_command.py')
| -rw-r--r-- | tests/test_setup_command.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py index 1e4111be9..bfd8e3903 100644 --- a/tests/test_setup_command.py +++ b/tests/test_setup_command.py @@ -99,7 +99,7 @@ def nonascii_srcdir(request, setup_command): .. toctree:: %(mb_name)s/%(mb_name)s - """ % locals())).encode('utf-8')) + """ % locals())).encode()) @pytest.mark.usefixtures('nonascii_srcdir') |
