The request fixture is an internal pytest fixture that provides useful information about the requesting test. It can be declared in test functions and fixtures, and provides attributes such as the following:
- function: the Python test function object, available for function-scoped fixtures.
- cls/instance: the Python class/instance of a test method object, available for function- and class-scoped fixtures. It can be None if the fixture is being requested from a test function, as opposed to a test method.
- module: the Python module object of the requesting test method, available for module-, function-, and class-scoped fixtures.
- session: pytest's internal Session object, which is a singleton for the test session and represents the root ...