diff --git a/tests/test-archive.t b/tests/test-archive.t --- a/tests/test-archive.t +++ b/tests/test-archive.t @@ -580,16 +580,11 @@ Strms Blocks Compressed Uncompressed Ratio Check Filename (xz !) $ rm -f ../archive.txz #endif -#if py3 no-lzma +#if no-lzma $ hg archive ../archive.txz abort: lzma module is not available [255] #endif -#if no-py3 - $ hg archive ../archive.txz - abort: xz compression is only available in Python 3 - [255] -#endif show an error when a provided pattern matches no files diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -3,33 +3,6 @@ $ . "$TESTDIR/helpers-testrepo.sh" $ cd "$TESTDIR"/.. -#if no-py3 - $ testrepohg files 'set:(**.py)' \ - > -X contrib/automation/ \ - > -X contrib/packaging/hgpackaging/ \ - > -X contrib/packaging/inno/ \ - > -X contrib/packaging/packaging.py \ - > -X contrib/packaging/wix/ \ - > -X hgdemandimport/demandimportpy2.py \ - > -X mercurial/thirdparty/cbor \ - > | sed 's|\\|/|g' | xargs "$PYTHON" contrib/check-py3-compat.py - contrib/python-zstandard/setup.py not using absolute_import - contrib/python-zstandard/setup_zstd.py not using absolute_import - contrib/python-zstandard/tests/common.py not using absolute_import - contrib/python-zstandard/tests/test_buffer_util.py not using absolute_import - contrib/python-zstandard/tests/test_compressor.py not using absolute_import - contrib/python-zstandard/tests/test_compressor_fuzzing.py not using absolute_import - contrib/python-zstandard/tests/test_data_structures.py not using absolute_import - contrib/python-zstandard/tests/test_data_structures_fuzzing.py not using absolute_import - contrib/python-zstandard/tests/test_decompressor.py not using absolute_import - contrib/python-zstandard/tests/test_decompressor_fuzzing.py not using absolute_import - contrib/python-zstandard/tests/test_estimate_sizes.py not using absolute_import - contrib/python-zstandard/tests/test_module_attributes.py not using absolute_import - contrib/python-zstandard/tests/test_train_dictionary.py not using absolute_import - setup.py not using absolute_import -#endif - -#if py3 $ testrepohg files 'set:(**.py) - grep(pygments)' \ > -X hgdemandimport/demandimportpy2.py \ > -X hgext/fsmonitor/pywatchman \ @@ -44,9 +17,8 @@ mercurial/windows.py: error importing: <*Error> No module named 'msvcrt' (error at windows.py:*) (glob) (no-windows !) mercurial/posix.py: error importing: <*Error> No module named 'fcntl' (error at posix.py:*) (glob) (windows !) mercurial/scmposix.py: error importing: <*Error> No module named 'fcntl' (error at scmposix.py:*) (glob) (windows !) -#endif -#if py3 pygments +#if pygments $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \ > | xargs "$PYTHON" contrib/check-py3-compat.py \ > | sed 's/[0-9][0-9]*)$/*)/' diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -307,22 +307,6 @@ ambigabs.s=libroot/ambig.py $TESTTMP/a -#if no-py3 - $ cat > $TESTTMP/libroot/mod/ambigrel.py < import ambig # should load "libroot/mod/ambig.py" - > s = ambig.s - > NO_CHECK_EOF - $ cat > loadrel.py < import mod.ambigrel as ambigrel - > def extsetup(ui): - > print('ambigrel.s=%s' % ambigrel.s, flush=True) - > NO_CHECK_EOF - $ "$PYTHON" $TESTTMP/unflush.py loadrel.py - $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) - ambigrel.s=libroot/mod/ambig.py - $TESTTMP/a -#endif - Check absolute/relative import of extension specific modules $ mkdir $TESTTMP/extroot @@ -373,39 +357,6 @@ (extroot) import extroot.bar in func(): this is extroot.bar $TESTTMP/a -#if no-py3 - $ rm "$TESTTMP"/extroot/foo.* - $ rm -Rf "$TESTTMP/extroot/__pycache__" - $ cat > $TESTTMP/extroot/foo.py < # test relative import - > buf = [] - > def func(): - > # "not locals" case - > import bar - > buf.append('import bar in func(): %s' % bar.s) - > return '\n(extroot) '.join(buf) - > # "fromlist == ('*',)" case - > from bar import * - > buf.append('from bar import *: %s' % s) - > # "not fromlist" and "if '.' in name" case - > import sub1.baz - > buf.append('import sub1.baz: %s' % sub1.baz.s) - > # "not fromlist" and NOT "if '.' in name" case - > import sub1 - > buf.append('import sub1: %s' % sub1.s) - > # NOT "not fromlist" and NOT "level != -1" case - > from bar import s - > buf.append('from bar import s: %s' % s) - > NO_CHECK_EOF - $ hg --config extensions.extroot=$TESTTMP/extroot root - (extroot) from bar import *: this is extroot.bar - (extroot) import sub1.baz: this is extroot.sub1.baz - (extroot) import sub1: this is extroot.sub1.__init__ - (extroot) from bar import s: this is extroot.bar - (extroot) import bar in func(): this is extroot.bar - $TESTTMP/a -#endif - #if demandimport Examine whether module loading is delayed until actual referring, even diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t --- a/tests/test-subrepo-git.t +++ b/tests/test-subrepo-git.t @@ -1,20 +1,5 @@ #require git -# XXX-CHG When running with python2 + chg this test tend to get stuck and end up -# as a time-out error. My effort to reproduce this outside of the CI failed. The -# test itself seems to pass fine, but never "complete". Debugging it is slow and -# tedious. This as a bad impact on the development process as most CI run end up -# wasting abotu 1h until that one fails. -# -# Pierre-Yves David, Augie Fackler and Raphaël Gomès all agreed to disable this -# case in that specific case until we figure this out (or we drop python2 o:-) ) - -#if no-py3 chg - $ echo 'skipped: this test get stuck on the CI with python2 + chg. investigation needed' - $ exit 80 -#endif - - make git commits repeatable $ cat >> $HGRCPATH <