changeset 40565:71b8ad0ef3e0

tests: fix up some import statements caught by Python 3 I'm curious how the import checker manages to be so much more pedantic in Python 3, but not enough to bother exploring. Differential Revision: https://phab.mercurial-scm.org/D5240
author Augie Fackler <augie@google.com>
date Wed, 07 Nov 2018 14:21:39 -0500
parents 0df4d93fdc27
children b9557567cc3f
files tests/test-remotefilelog-bundle2-legacy.t tests/test-remotefilelog-cacheprocess.t
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-remotefilelog-bundle2-legacy.t	Wed Nov 07 10:29:38 2018 -0800
+++ b/tests/test-remotefilelog-bundle2-legacy.t	Wed Nov 07 14:21:39 2018 -0500
@@ -6,8 +6,8 @@
 generaldelta to generaldelta interactions with bundle2 but legacy clients
 without changegroup2 support
   $ cat > testcg2.py << EOF
+  > import sys
   > from mercurial import changegroup, registrar, util
-  > import sys
   > cmdtable = {}
   > command = registrar.command(cmdtable)
   > @command('testcg2', norepo=True)
@@ -22,7 +22,7 @@
   $ hg testcg2 || exit 80
 
   $ cat > disablecg2.py << EOF
-  > from mercurial import changegroup, util, error
+  > from mercurial import changegroup, error, util
   > deleted = False
   > def reposetup(ui, repo):
   >     global deleted
--- a/tests/test-remotefilelog-cacheprocess.t	Wed Nov 07 10:29:38 2018 -0800
+++ b/tests/test-remotefilelog-cacheprocess.t	Wed Nov 07 14:21:39 2018 -0500
@@ -16,7 +16,9 @@
   $ cd ..
 
   $ cat > cacheprocess-logger.py <<EOF
-  > import sys, os, shutil
+  > import os
+  > import shutil
+  > import sys
   > f = open('$TESTTMP/cachelog.log', 'w')
   > srccache = os.path.join('$TESTTMP', 'oldhgcache')
   > def log(message):