comparison tests/hghave.py @ 30441:de48d3a0573a

hghave: add check for zstd support Not all configurations will support zstd. Add a check so we can conditionalize tests.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 10 Nov 2016 23:38:41 -0800
parents d4db88a26ad5
children d83ca854fa21
comparison
equal deleted inserted replaced
30440:c3944ab1443a 30441:de48d3a0573a
608 return False 608 return False
609 609
610 @check("unziplinks", "unzip(1) understands and extracts symlinks") 610 @check("unziplinks", "unzip(1) understands and extracts symlinks")
611 def unzip_understands_symlinks(): 611 def unzip_understands_symlinks():
612 return matchoutput('unzip --help', br'Info-ZIP') 612 return matchoutput('unzip --help', br'Info-ZIP')
613
614 @check("zstd", "zstd Python module available")
615 def has_zstd():
616 try:
617 import mercurial.zstd
618 mercurial.zstd.__version__
619 return True
620 except ImportError:
621 return False