[PATCH 6 of 8 v2] tests: make test-simplemerge use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Tue Apr 12 16:48:20 EDT 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1460493759 -19800
#      Wed Apr 13 02:12:39 2016 +0530
# Node ID 228637e3f62be637ae5dfbb9589f3fb56248e358
# Parent  5cea9a73642c4e718584fdb3029ebddf6ce5f573
tests: make test-simplemerge use absolute_import

diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -63,7 +63,6 @@
   tests/test-pathencode.py not using absolute_import
   tests/test-pathencode.py requires print_function
   tests/test-run-tests.py not using absolute_import
-  tests/test-simplemerge.py not using absolute_import
 
 #if py3exe
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
diff --git a/tests/test-simplemerge.py b/tests/test-simplemerge.py
--- a/tests/test-simplemerge.py
+++ b/tests/test-simplemerge.py
@@ -13,10 +13,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import
+
 import unittest
-from unittest import TestCase
-from mercurial import util, simplemerge, error
+from mercurial import (
+    error,
+    simplemerge,
+    util,
+)
 
+testcase=unittest.Testcase
 # bzr compatible interface, for the tests
 class Merge3(simplemerge.Merge3Text):
     """3-way merge of texts.
@@ -107,7 +113,7 @@
 >>>>>>> TAO
 """)
 
-class TestMerge3(TestCase):
+class TestMerge3(testcase):
     def log(self, msg):
         pass
 


More information about the Mercurial-devel mailing list