Framework Mode - Asserting warnings (pytest.warns)
Folder Structure
test_project/ ├── tests/ │ ├── test_example.py # Test files using pytest │ └── test_warnings.py # Tests specifically for warning assertions ├── src/ │ └── module.py # Application code that may trigger warnings ├── conftest.py # pytest fixtures and hooks ├── pytest.ini # pytest configuration file └── requirements.txt # Project dependencies