diff tests/test-atomictempfile.py @ 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 f00f1de16454
children a109bf7e0dc2
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__)