##// END OF EJS Templates
tests: drop "absimport" conditionals which should be always true
Yuya Nishihara -
r33528:c384ac3e default
parent child Browse files
Show More
@@ -585,12 +585,6 b' def has_debhelper():'
585 def has_demandimport():
585 def has_demandimport():
586 return os.environ.get('HGDEMANDIMPORT') != 'disable'
586 return os.environ.get('HGDEMANDIMPORT') != 'disable'
587
587
588 @check("absimport", "absolute_import in __future__")
589 def has_absimport():
590 import __future__
591 from mercurial import util
592 return util.safehasattr(__future__, "absolute_import")
593
594 @check("py3k", "running with Python 3.x")
588 @check("py3k", "running with Python 3.x")
595 def has_py3k():
589 def has_py3k():
596 return 3 == sys.version_info[0]
590 return 3 == sys.version_info[0]
@@ -164,7 +164,6 b' Check "from __future__ import absolute_i'
164 $ touch $TESTTMP/libroot/mod/__init__.py
164 $ touch $TESTTMP/libroot/mod/__init__.py
165 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
165 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
166
166
167 #if absimport
168 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
167 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
169 > from __future__ import absolute_import
168 > from __future__ import absolute_import
170 > import ambig # should load "libroot/ambig.py"
169 > import ambig # should load "libroot/ambig.py"
@@ -178,7 +177,6 b' Check "from __future__ import absolute_i'
178 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
177 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
179 ambigabs.s=libroot/ambig.py
178 ambigabs.s=libroot/ambig.py
180 $TESTTMP/a (glob)
179 $TESTTMP/a (glob)
181 #endif
182
180
183 #if no-py3k
181 #if no-py3k
184 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
182 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
@@ -277,7 +275,7 b' Check absolute/relative import of extens'
277 $TESTTMP/a (glob)
275 $TESTTMP/a (glob)
278 #endif
276 #endif
279
277
280 #if demandimport absimport
278 #if demandimport
281
279
282 Examine whether module loading is delayed until actual referring, even
280 Examine whether module loading is delayed until actual referring, even
283 though module is imported with "absolute_import" feature.
281 though module is imported with "absolute_import" feature.
General Comments 0
You need to be logged in to leave comments. Login now