TestFile

Condition that matches when the current event targets a test file (test_*.py, conftest.py).

Usage

Source

TestFile(project_only=True)

Parameter Attributes

project_only: bool = True

Attributes

Name Description
__test__ Returns True when the argument is true, False otherwise.

__test__

Returns True when the argument is true, False otherwise.

test=False

The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.