pytest_exploratory.interactive

Run a pytest session interactively.

request_teardown(request, fixturename)[source]

Teardown a given fixture name.

class InteractiveSession[source]

Bases: object

Wrapper around pytest to collect and run tests interactively.

Not working very well yet, pytest does not like to run or collect tests multiple times. It needs to be better integrated with pytest’s core.

start(args=None)[source]

Initialize the pytest config from the given arguments.

session_start()[source]

Start a pytest session.

collect(path)[source]

Collect tests under the given path.

context(context='')[source]

Put ourselves in the given context (for fixture and conftest discovery).

runtests()[source]

Run the tests under the current context.

fixture(fixturename)[source]

Return the value of the given fixture.

fixture_with_name(fixturename)[source]

Return the name and value of the given fixture.

fixture_definition(fixturename)[source]
fixture_param(fixturename, param)[source]

Choose parameter for this parametrized fixture.

property fixturenames
property request

Request fixture for the current context.

session_stop()[source]

Stop the test session (runs teardown).

stop()[source]

Stop pytest.