Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/test_render_script.py

Issue 29992563: Noissue - Work around N812 and E117 from flake8 update (Closed) Base URL: https://hg.adblockplus.org/python-abp
Patch Set: Created Jan. 29, 2019, 4:32 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld