Patchwork [2,of,5] tests: fix style issue of importing order in test-lock.py

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Oct. 12, 2018, 7:48 a.m.
Message ID <06db0c68e10d53381714.1539330524@blacknile>
Download mbox | patch
Permalink /patch/35648/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Oct. 12, 2018, 7:48 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1538963136 -32400
#      Mon Oct 08 10:45:36 2018 +0900
# Node ID 06db0c68e10d53381714f5f4224f00cf4d07a4d0
# Parent  46871703ab061d8370eb1a56c0df3e5d748ae154
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 06db0c68e10d
# EXP-Topic tests-fix-import-issues
tests: fix style issue of importing order in test-lock.py

test-lock.py is excluded in test-check-module-imports.t, because
import-checker.py reports that some stdlibs are imported after local
silenttestrunner module.

I can not found out any reason why tests/silenttestrunner.py should be
imported before some stdlibs from the point of functionality view.

Patch

diff --git a/tests/test-lock.py b/tests/test-lock.py
--- a/tests/test-lock.py
+++ b/tests/test-lock.py
@@ -2,11 +2,12 @@  from __future__ import absolute_import
 
 import copy
 import errno
-import silenttestrunner
 import tempfile
 import types
 import unittest
 
+import silenttestrunner
+
 from mercurial import (
     encoding,
     error,