[PATCH 4 of 4 v4] tests: guard demandimport segment of test-extension.t
timeless
timeless at fmr.im
Thu Aug 25 19:09:52 EDT 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1472164568 0
# Thu Aug 25 22:36:08 2016 +0000
# Node ID 6aba52403b756644e37b2b6db04f70db167a519a
# Parent 238d7a96b8652f4ee63946eb680303070ffebfbf
# Available At https://bitbucket.org/timeless/mercurial-crew
# hg pull https://bitbucket.org/timeless/mercurial-crew -r 6aba52403b75
tests: guard demandimport segment of test-extension.t
diff -r 238d7a96b865 -r 6aba52403b75 tests/hghave.py
--- a/tests/hghave.py Thu Aug 25 22:03:51 2016 +0000
+++ b/tests/hghave.py Thu Aug 25 22:36:08 2016 +0000
@@ -102,6 +102,13 @@
s = p.stdout.read()
return (ignorestatus or not ret) and r.search(s)
+def ensuremercurial():
+ try:
+ from mercurial import __version__
+ except ImportError:
+ testdir = os.path.dirname(os.path.abspath(__file__))
+ sys.path.append(os.path.dirname(testdir))
+
@check("baz", "GNU Arch baz client")
def has_baz():
return matchoutput('baz --version 2>&1', br'baz Bazaar version')
diff -r 238d7a96b865 -r 6aba52403b75 tests/test-extension.t
--- a/tests/test-extension.t Thu Aug 25 22:03:51 2016 +0000
+++ b/tests/test-extension.t Thu Aug 25 22:36:08 2016 +0000
@@ -249,7 +249,7 @@
$TESTTMP/a (glob)
#endif
-#if absimport
+#if demandimport absimport
Examine whether module loading is delayed until actual refering, even
though module is imported with "absolute_import" feature.
More information about the Mercurial-devel
mailing list