Patchwork [1,of,9] tests: sort import lines in dumbhttp.py

login
register
mail settings
Submitter Yuya Nishihara
Date April 4, 2016, 3:07 p.m.
Message ID <9f464eb9b73b47c54202.1459782454@mimosa>
Download mbox | patch
Permalink /patch/14346/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Yuya Nishihara - April 4, 2016, 3:07 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1459680005 -32400
#      Sun Apr 03 19:40:05 2016 +0900
# Node ID 9f464eb9b73b47c5420264774b373ce049ad9148
# Parent  cb235ffd29c42a2f449f78a6f8c049bcf84a997f
tests: sort import lines in dumbhttp.py

This series is an attempt to enable import-checker.py for tests/**.py, but
it turned out not easy. Since many tests have been ported to absolute_import
without the coverage, import-checker.py reports a lot of errors right now.

Should we enable import-checker.py without fixing all of them so that we
won't get more errors?
timeless - April 4, 2016, 10:49 p.m.
Yuya Nishihara wrote:
> Should we enable import-checker.py without fixing all of them so that we
> won't get more errors?

how about a fileset that excludes all the ones we know currently fail.
That way the output doesn't include them, but we don't get new
offenders?
Yuya Nishihara - April 5, 2016, 1:23 p.m.
On Mon, 4 Apr 2016 18:49:32 -0400, timeless wrote:
> Yuya Nishihara wrote:
> > Should we enable import-checker.py without fixing all of them so that we
> > won't get more errors?  
> 
> how about a fileset that excludes all the ones we know currently fail.
> That way the output doesn't include them, but we don't get new
> offenders?

Good idea. I'll do that.

Patch

diff --git a/tests/dumbhttp.py b/tests/dumbhttp.py
--- a/tests/dumbhttp.py
+++ b/tests/dumbhttp.py
@@ -6,10 +6,10 @@  from __future__ import absolute_import
 Small and dumb HTTP server for use in tests.
 """
 
+import BaseHTTPServer
+import SimpleHTTPServer
 import optparse
-import BaseHTTPServer
 import signal
-import SimpleHTTPServer
 import sys
 
 from mercurial import (