diff -r 40120de810ba -r 2c0043977b6d tests/hghave.py --- a/tests/hghave.py Wed Jul 08 08:25:30 2020 +0200 +++ b/tests/hghave.py Wed Jul 08 08:57:21 2020 +0200 @@ -1074,3 +1074,14 @@ return matchoutput( '`rustup which --toolchain nightly rustfmt` --version', b'rustfmt' ) + + +@check("lzma", "python lzma module") +def has_lzma(): + try: + import _lzma + + _lzma.FORMAT_XZ + return True + except ImportError: + return False