Framework Mode - Asserting log messages
Folder Structure
tests/ ├── test_example.py # Test files ├── conftest.py # Fixtures and hooks utils/ ├── logger.py # Logger setup and helpers pytest.ini # Pytest configuration requirements.txt # Dependencies
tests/ ├── test_example.py # Test files ├── conftest.py # Fixtures and hooks utils/ ├── logger.py # Logger setup and helpers pytest.ini # Pytest configuration requirements.txt # Dependencies
[pytest] log_cli = true log_cli_level = INFO
log_cli=true.pytest-html to generate reports including captured logs.caplog fixture to capture and assert log messages in tests.Where in this framework structure would you add a new test that verifies a warning log message is generated when invalid input is given?