[PATCH 3 of 8 v2] py3: make tests/test-atomictempfile.py use absolute_import
Pulkit Goyal
7895pulkit at gmail.com
Mon May 16 00:39:58 UTC 2016
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1463353102 -19800
# Mon May 16 04:28:22 2016 +0530
# Node ID 72c75ef51a4973ed672e9ea74aab499a055422fb
# Parent 4fc6d3d7553cf15410297217eb6b091a096adca0
py3: make tests/test-atomictempfile.py use absolute_import
diff --git a/tests/test-atomictempfile.py b/tests/test-atomictempfile.py
--- a/tests/test-atomictempfile.py
+++ b/tests/test-atomictempfile.py
@@ -1,9 +1,13 @@
+from __future__ import absolute_import
+
+import glob
import os
-import glob
import unittest
-import silenttestrunner
-from mercurial.util import atomictempfile
+from mercurial import (
+ util,
+)
+atomictempfile = util.atomictempfile
class testatomictempfile(unittest.TestCase):
def test1_simple(self):
@@ -39,4 +43,5 @@
self.assertRaises(TypeError, atomictempfile)
if __name__ == '__main__':
+ import silenttestrunner
silenttestrunner.main(__name__)
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
@@ -32,7 +32,6 @@
tests/readlink.py requires print_function
tests/run-tests.py not using absolute_import
tests/svn-safe-append.py not using absolute_import
- tests/test-atomictempfile.py not using absolute_import
tests/test-demandimport.py not using absolute_import
#if py3exe
More information about the Mercurial-devel
mailing list