diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -780,6 +780,14 @@ return (py_major, py_minor) >= (int(major), int(minor)) +@checkvers("pyexact", "Python == %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9)) +def has_python_exact(v): + major, minor = v.split(".")[0:2] + py_major, py_minor = sys.version_info.major, sys.version_info.minor + + return (py_major, py_minor) == (int(major), int(minor)) + + @check("py3", "running with Python 3.x") def has_py3(): return 3 == sys.version_info[0] diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t --- a/tests/test-ssh-proto.t +++ b/tests/test-ssh-proto.t @@ -111,7 +111,7 @@ o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n 440 capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash - o> flush() -> None + o> flush() -> None (no-pyexact35 !) $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF > hello @@ -125,7 +125,7 @@ o> 440\n o> write(440) -> 440: o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n - o> flush() -> None + o> flush() -> None (no-pyexact35 !) $ cd ..