hbutils.testing.requires
System requirement predicates for conditional test execution.
This package module aggregates a collection of requirement checkers that are
commonly used with conditional test decorators such as
unittest.skipUnless() or pytest.mark.skipUnless. The available
predicates and objects are imported from the following submodules:
hbutils.testing.requires.cmd- command availability checkshbutils.testing.requires.expr- Python version and implementation expressionshbutils.testing.requires.git- Git and Git LFS availability checks
The module exposes these utilities at the package level via import * to
provide a concise import experience for test suites.
Example:
>>> from hbutils.testing.requires import vpython, is_git_installed
>>> # Check the current Python version (evaluated at runtime)
>>> vpython >= '3.7'
True
>>> # Check whether Git is installed on the system
>>> is_git_installed()
True
Note
The exported names depend on the corresponding submodules. Refer to
hbutils.testing.requires.cmd, hbutils.testing.requires.expr,
and hbutils.testing.requires.git for detailed descriptions of
individual utilities.