Index: tests/test_render_script.py |
=================================================================== |
--- a/tests/test_render_script.py |
+++ b/tests/test_render_script.py |
@@ -25,18 +25,19 @@ |
import pytest |
import subprocess |
import threading |
try: |
import SimpleHTTPServer |
import SocketServer |
except ImportError: # The modules were renamed/moved in Python 3. |
- import http.server as SimpleHTTPServer |
- import socketserver as SocketServer |
+ from http import server |
+ import socketserver |
+ SimpleHTTPServer, SocketServer = server, socketserver |
rhowell
2019/01/29 20:28:39
Just curious, why not do it in 2 lines instead of
Vasily Kuznetsov
2019/01/30 10:42:48
I was trying to avoid disabling the linter. But al
|
@pytest.fixture |
def rootdir(tmpdir): |
"""Directory with prepared list fragments.""" |
rootdir = tmpdir.join('root') |
rootdir.mkdir() |
# Simple file with just `Ok` and a non-ascii unicode character in it. |