PyTest Markers related utilities

PyTest Markers related utilities.

pytestskipmarkers.utils.markers.skip_if_not_root()[source]

Helper function to check for root/Administrator privileges.

Returns:

str: The reason of the skip

Return type

Optional[str]

pytestskipmarkers.utils.markers.skip_if_binaries_missing(binaries, check_all=True, reason=None)[source]

Helper function to check for existing binaries.

Args:
binaries (list or tuple):

Iterator of binaries to check

check_all (bool):

If check_all is True, the default, all binaries must exist. If check_all is False, then only one the passed binaries needs to be found. Useful when, for example, passing a list of python interpreter names(python3.5, python3, python), where only one needs to exist.

reason (str):

The skip reason.

Returns:

str: The reason for the skip. None: Should not be skipped.

Parameters
Return type

Optional[str]

pytestskipmarkers.utils.markers.skip_if_no_local_network()[source]

Helper function to check for existing local network.

Returns:

str: The reason for the skip. None: Should not be skipped.

Return type

Optional[str]

pytestskipmarkers.utils.markers.skip_if_no_remote_network()[source]

Helper function to check for existing remote network(internet).

Returns:

str: The reason for the skip. None: Should not be skipped.

Return type

Optional[str]

pytestskipmarkers.utils.markers.evaluate_markers(item)[source]

Fixtures injection based on markers or test skips based on CLI arguments.

Parameters

item (Item) –

Return type

None