Patchwork [6,of,7] tests/fakepatchtime.py: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 7, 2015, 6:52 a.m.
Message ID <199dd71e1d0fb5f4d5fd.1449471133@ubuntu-main>
Download mbox | patch
Permalink /patch/11897/
State Accepted
Headers show

Comments

Gregory Szorc - Dec. 7, 2015, 6:52 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1449468879 28800
#      Sun Dec 06 22:14:39 2015 -0800
# Node ID 199dd71e1d0fb5f4d5fde31901ac8f13c26b8f38
# Parent  97021d7337b031fc9fc490b90fc2adbd0ec21dc0
tests/fakepatchtime.py: use absolute_import

Patch

diff --git a/tests/fakepatchtime.py b/tests/fakepatchtime.py
--- a/tests/fakepatchtime.py
+++ b/tests/fakepatchtime.py
@@ -1,12 +1,18 @@ 
 # extension to emulate invoking 'patch.internalpatch()' at the time
 # specified by '[fakepatchtime] fakenow'
 
-from mercurial import extensions, patch as patchmod, util
+from __future__ import absolute_import
+
+from mercurial import (
+    extensions,
+    patch as patchmod,
+    util,
+)
 
 def internalpatch(orig, ui, repo, patchobj, strip,
                   prefix='', files=None,
                   eolmode='strict', similarity=0):
     if files is None:
         files = set()
     r = orig(ui, repo, patchobj, strip,
              prefix=prefix, files=files,
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
@@ -138,17 +138,16 @@ 
   mercurial/scmposix.py not using absolute_import
   mercurial/scmutil.py not using absolute_import
   mercurial/scmwindows.py not using absolute_import
   mercurial/similar.py not using absolute_import
   mercurial/store.py not using absolute_import
   mercurial/util.py not using absolute_import
   mercurial/windows.py not using absolute_import
   setup.py not using absolute_import
-  tests/fakepatchtime.py not using absolute_import
   tests/filterpyflakes.py not using absolute_import
   tests/filterpyflakes.py requires print_function
   tests/generate-working-copy-states.py not using absolute_import
   tests/generate-working-copy-states.py requires print_function
   tests/get-with-headers.py not using absolute_import
   tests/get-with-headers.py requires print_function
   tests/heredoctest.py not using absolute_import
   tests/heredoctest.py requires print_function