tests/test-parseindex2.py
changeset 32372 df448de7cf3b
parent 29205 a0939666b836
child 37893 b4e42a9bd12e
--- a/tests/test-parseindex2.py	Sat Aug 13 12:18:58 2016 +0900
+++ b/tests/test-parseindex2.py	Sat Aug 13 12:23:56 2016 +0900
@@ -14,9 +14,11 @@
     nullrev,
 )
 from mercurial import (
-    parsers,
+    policy,
 )
 
+parsers = policy.importmod(r'parsers')
+
 # original python implementation
 def gettype(q):
     return int(q & 0xFFFF)
@@ -114,7 +116,7 @@
     # of the currently-running Python interpreter, so we monkey-patch
     # sys.hexversion to simulate using different versions.
     code = ("import sys; sys.hexversion=%s; "
-            "import mercurial.parsers" % hexversion)
+            "import mercurial.cext.parsers" % hexversion)
     cmd = "python -c \"%s\"" % code
     # We need to do these tests inside a subprocess because parser.c's
     # version-checking code happens inside the module init function, and