D2580: tests: fix various test-check-module-imports.t violations
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Mar 3 14:32:18 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7bc33d677c0c: tests: fix various test-check-module-imports.t violations (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2580?vs=6424&id=6452
REVISION DETAIL
https://phab.mercurial-scm.org/D2580
AFFECTED FILES
tests/test-i18n.t
tests/test-lfs.t
tests/test-resolve.t
tests/test-rollback.t
tests/test-split.t
CHANGE DETAILS
diff --git a/tests/test-split.t b/tests/test-split.t
--- a/tests/test-split.t
+++ b/tests/test-split.t
@@ -2,7 +2,8 @@
$ cat > $TESTTMP/editor.py <<EOF
> #!$PYTHON
- > import os, sys
+ > import os
+ > import sys
> path = os.path.join(os.environ['TESTTMP'], 'messages')
> messages = open(path).read().split('--\n')
> prompt = open(sys.argv[1]).read()
diff --git a/tests/test-rollback.t b/tests/test-rollback.t
--- a/tests/test-rollback.t
+++ b/tests/test-rollback.t
@@ -220,8 +220,8 @@
> import errno
> from mercurial.i18n import _
> from mercurial import (
+ > error,
> registrar,
- > error,
> ui as uimod,
> )
>
diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -85,7 +85,12 @@
$ cat > $TESTTMP/markdriver.py << EOF
> '''mark and unmark files as driver-resolved'''
- > from mercurial import merge, registrar, scmutil, pycompat
+ > from mercurial import (
+ > merge,
+ > pycompat,
+ > registrar,
+ > scmutil,
+ > )
> cmdtable = {}
> command = registrar.command(cmdtable)
> @command(b'markdriver',
diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -616,8 +616,8 @@
$ cat > $TESTTMP/dumpflog.py << EOF
> # print raw revision sizes, flags, and hashes for certain files
> import hashlib
+ > from mercurial.node import short
> from mercurial import revlog
- > from mercurial.node import short
> def hash(rawtext):
> h = hashlib.sha512()
> h.update(rawtext)
diff --git a/tests/test-i18n.t b/tests/test-i18n.t
--- a/tests/test-i18n.t
+++ b/tests/test-i18n.t
@@ -54,8 +54,8 @@
Check i18n cache isn't reused after encoding change:
$ cat > $TESTTMP/encodingchange.py << EOF
+ > from mercurial.i18n import _
> from mercurial import encoding, registrar
- > from mercurial.i18n import _
> cmdtable = {}
> command = registrar.command(cmdtable)
> @command(b'encodingchange', norepo=True)
To: durin42, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel
More information about the Mercurial-devel
mailing list