diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -633,16 +633,6 @@ def has_py3k(): def has_python3exe(): return matchoutput('python3 -V', br'^Python 3.(5|6|7|8|9)') -@check("py3pygments", "Pygments available on Python 3.x") -def has_py3pygments(): - if has_py3k(): - return has_pygments() - elif has_python3exe(): - # just check exit status (ignoring output) - py3 = os.environ['PYTHON3'] - return matchoutput('%s -c "import pygments"' % py3, br'') - return False - @check("pure", "running with pure Python code") def has_pure(): return any([ 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 @@ -24,13 +24,13 @@ setup.py not using absolute_import #endif -#if py3exe +#if py3k $ testrepohg files 'set:(**.py) - grep(pygments)' \ > -X hgdemandimport/demandimportpy2.py \ > -X hgext/fsmonitor/pywatchman \ > -X mercurial/cffi \ > -X mercurial/thirdparty \ - > | sed 's|\\|/|g' | xargs python3 contrib/check-py3-compat.py \ + > | sed 's|\\|/|g' | xargs $PYTHON contrib/check-py3-compat.py \ > | sed 's/[0-9][0-9]*)$/*)/' hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob) (?) hgext/infinitepush/sqlindexapi.py: error importing: <*Error> No module named 'mysql' (error at sqlindexapi.py:*) (glob) (?) @@ -40,8 +40,8 @@ #endif -#if py3exe py3pygments +#if py3k pygments $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \ - > | xargs python3 contrib/check-py3-compat.py \ + > | xargs $PYTHON contrib/check-py3-compat.py \ > | sed 's/[0-9][0-9]*)$/*)/' #endif