changeset 29194:3bea82dd4c4e

py3: make tests/test-atomictempfile.py use absolute_import
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 16 May 2016 04:28:22 +0530
parents cd3c6f3ee5e9
children bdba6a2015d0
files tests/test-atomictempfile.py tests/test-check-py3-compat.t
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-atomictempfile.py	Mon May 16 04:08:17 2016 +0530
+++ b/tests/test-atomictempfile.py	Mon May 16 04:28:22 2016 +0530
@@ -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__)
--- a/tests/test-check-py3-compat.t	Mon May 16 04:08:17 2016 +0530
+++ b/tests/test-check-py3-compat.t	Mon May 16 04:28:22 2016 +0530
@@ -30,7 +30,6 @@
   tests/readlink.py not using absolute_import
   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