From 992e6c972786a148ac3e5044a321772b7bae7fb1 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 25 Aug 2020 16:39:00 +0200 Subject: Remove compatibility code for py<3.6 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- tests/testutil.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'tests') 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)) -- cgit v1.2.3