Mercurial > hg
changeset 33528:c384ac3ea147
tests: drop "absimport" conditionals which should be always true
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 16 Jul 2017 17:47:10 +0900 |
parents | 6a3e83781c6e |
children | ded3ebae8779 |
files | tests/hghave.py tests/test-extension.t |
diffstat | 2 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py Sat Jul 15 14:17:35 2017 +0200 +++ b/tests/hghave.py Sun Jul 16 17:47:10 2017 +0900 @@ -585,12 +585,6 @@ def has_demandimport(): return os.environ.get('HGDEMANDIMPORT') != 'disable' -@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]
--- a/tests/test-extension.t Sat Jul 15 14:17:35 2017 +0200 +++ b/tests/test-extension.t Sun Jul 16 17:47:10 2017 +0900 @@ -164,7 +164,6 @@ $ 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 @@ $ (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 @@ $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.