[PATCH 1 of 4] tests: drop "absimport" conditionals which should be always true
Yuya Nishihara
yuya at tcha.org
Sun Jul 16 14:41:48 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1500194830 -32400
# Sun Jul 16 17:47:10 2017 +0900
# Node ID 5a71b2b7e12f057175e293daf74c7dee897f3008
# Parent 389536aff376d32d38f13305021c127245d4126a
tests: drop "absimport" conditionals which should be always true
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -585,12 +585,6 @@ def has_debhelper():
def has_demandimport():
return os.environ.get('HGDEMANDIMPORT') != 'disable'
- at check("absimport", "absolute_import in __future__")
-def has_absimport():
- import __future__
- from mercurial import util
- return util.safehasattr(__future__, "absolute_import")
-
@check("py3k", "running with Python 3.x")
def has_py3k():
return 3 == sys.version_info[0]
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -164,7 +164,6 @@ Check "from __future__ import absolute_i
$ touch $TESTTMP/libroot/mod/__init__.py
$ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
-#if absimport
$ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
> from __future__ import absolute_import
> import ambig # should load "libroot/ambig.py"
@@ -178,7 +177,6 @@ Check "from __future__ import absolute_i
$ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
ambigabs.s=libroot/ambig.py
$TESTTMP/a (glob)
-#endif
#if no-py3k
$ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
@@ -277,7 +275,7 @@ Check absolute/relative import of extens
$TESTTMP/a (glob)
#endif
-#if demandimport absimport
+#if demandimport
Examine whether module loading is delayed until actual referring, even
though module is imported with "absolute_import" feature.
More information about the Mercurial-devel
mailing list