Patchwork [5,of,7] tests/fakedirstatewritetime.py: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 7, 2015, 6:52 a.m.
Message ID <97021d7337b031fc9fc4.1449471132@ubuntu-main>
Download mbox | patch
Permalink /patch/11896/
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 1449468816 28800
#      Sun Dec 06 22:13:36 2015 -0800
# Node ID 97021d7337b031fc9fc490b90fc2adbd0ec21dc0
# Parent  f3a9af8129869171744848eb97ae7631d79e0a96
tests/fakedirstatewritetime.py: use absolute_import

Patch

diff --git a/tests/fakedirstatewritetime.py b/tests/fakedirstatewritetime.py
--- a/tests/fakedirstatewritetime.py
+++ b/tests/fakedirstatewritetime.py
@@ -1,16 +1,24 @@ 
 # extension to emulate invoking 'dirstate.write()' at the time
 # specified by '[fakedirstatewritetime] fakenow', only when
 # 'dirstate.write()' is invoked via functions below:
 #
 #   - 'workingctx._checklookup()' (= 'repo.status()')
 #   - 'committablectx.markcommitted()'
 
-from mercurial import context, dirstate, extensions, parsers, util
+from __future__ import absolute_import
+
+from mercurial import (
+    context,
+    dirstate,
+    extensions,
+    parsers,
+    util,
+)
 
 def pack_dirstate(fakenow, orig, dmap, copymap, pl, now):
     # execute what original parsers.pack_dirstate should do actually
     # for consistency
     actualnow = int(now)
     for f, e in dmap.iteritems():
         if e[0] == 'n' and e[3] == actualnow:
             e = parsers.dirstatetuple(e[0], e[1], e[2], -1)
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/fakedirstatewritetime.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