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:

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.