What built-in fixtures do you use most?
IntermediateConceptTesting, services & metrics
Answer
tmp_path: a uniquepathlib.Pathtemp directory per test.monkeypatch: set/delete env vars, attributes and dict items, automatically undone (monkeypatch.setenv("AWS_DEFAULT_REGION", "us-east-1")).capsys/capfd: capture stdout/stderr.caplog: capture log records (assert "deleted" in caplog.text).request: access test metadata and parametrization inside fixtures.
More on Testing, services & metrics
Why should automation scripts have tests at all?BeginnerHow does pytest discover and run tests?BeginnerWhy does pytest use plain `assert` instead of `assertEqual`?BeginnerWhat are pytest fixtures, and what scopes exist?IntermediateHow does `@pytest.mark.parametrize` work?BeginnerWhat is moto, and how do you use it with pytest?Intermediate