summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-25 16:39:00 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-25 16:39:00 +0200
commit992e6c972786a148ac3e5044a321772b7bae7fb1 (patch)
treeb0d7577e6d62e7dbc59d18aca10fcd2fae55f09d /tests
parentbb29ed4e90facfa510af7685e0e658b501957620 (diff)
downloadgemato-992e6c972786a148ac3e5044a321772b7bae7fb1.tar.gz
Remove compatibility code for py<3.6 support
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/testutil.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/testutil.py b/tests/testutil.py
index 46800b3..f39533a 100644
--- a/tests/testutil.py
+++ b/tests/testutil.py
@@ -11,27 +11,19 @@ import os
import os.path
import random
import shutil
-import sys
import tempfile
import threading
import unittest
-if sys.hexversion >= 0x03000000:
- from http.server import HTTPServer, BaseHTTPRequestHandler
- from urllib.parse import urlparse, parse_qs
-else:
- from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
- from urlparse import urlparse, parse_qs
+from http.server import HTTPServer, BaseHTTPRequestHandler
+from urllib.parse import urlparse, parse_qs
import gemato.openpgp
class LoggingTestCase(unittest.TestCase):
def setUp(self):
- if sys.hexversion < 0x03000000:
- self.log = io.BytesIO()
- else:
- self.log = io.StringIO()
+ self.log = io.StringIO()
self.log_handler = logging.getLogger().addHandler(
logging.StreamHandler(self.log))