Framework Mode - Arrange-Act-Assert pattern
Folder Structure
project-root/ ├── tests/ │ ├── test_example.py │ ├── test_user.py │ └── __init__.py ├── src/ │ ├── calculator.py │ └── __init__.py ├── conftest.py ├── pytest.ini └── requirements.txt
project-root/ ├── tests/ │ ├── test_example.py │ ├── test_user.py │ └── __init__.py ├── src/ │ ├── calculator.py │ └── __init__.py ├── conftest.py ├── pytest.ini └── requirements.txt
conftest.py.src/calculator.py.assert statements in test functions inside tests/.conftest.py or separate utility modules.pytest.ini and environment variables.os.environ.@pytest.fixture in conftest.py to setup reusable test data or states.pytest --browser=chrome or similar to select test parameters dynamically.pytest -v for verbose output showing pass/fail per test.pytest-html to generate HTML reports for easy sharing.--maxfail=1 to stop on first failure during CI runs.Where in this framework structure would you add a new fixture to prepare test data for user login tests?