diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-08-04 15:02:20 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-08-04 17:05:58 +0200 |
commit | ded036cf988b0cf4b20002d88434282f30762638 (patch) | |
tree | d927a9732226093ffcdf7400808ae45f5b9e6c37 /tests/test_cli.py | |
parent | 65a81053d596c62ad2532c7e0e38e68ef61304bd (diff) | |
download | rsa-git-ded036cf988b0cf4b20002d88434282f30762638.tar.gz |
Removed compatibility code for Python 2.7 and 3.4
Diffstat (limited to 'tests/test_cli.py')
-rw-r--r-- | tests/test_cli.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py index 7ce57eb..7cf7ed4 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -15,21 +15,15 @@ from io import StringIO, BytesIO import rsa import rsa.cli import rsa.util -from rsa._compat import PY2 -def make_buffer(): - if PY2: - return BytesIO() +def make_buffer() -> StringIO: buf = StringIO() buf.buffer = BytesIO() return buf -def get_bytes_out(out): - if PY2: - # Python 2.x writes 'str' to stdout - return out.getvalue() +def get_bytes_out(out: StringIO) -> bytes: # Python 3.x writes 'bytes' to stdout.buffer return out.buffer.getvalue() |