Framework Mode - Testing custom exceptions
Folder Structure
tests/ ├── test_custom_exceptions.py ├── conftest.py utils/ ├── exceptions.py ├── helpers.py pytest.ini
tests/ ├── test_custom_exceptions.py ├── conftest.py utils/ ├── exceptions.py ├── helpers.py pytest.ini
utils/exceptions.py contains user-defined exception classes.utils/helpers.py has functions that may raise custom exceptions.tests/test_custom_exceptions.py contains pytest test functions that verify the custom exceptions are raised correctly.pytest.ini for pytest settings and conftest.py for fixtures or shared test setup.pytest.raises() context manager to assert exceptions are raised as expected.pytest-html or pytest-junitxml for detailed test results.pytest.raises() context manager for clear and readable exception assertions.Exception or a relevant base and not contain complex logic.conftest.py to provide test data or objects that trigger exceptions, avoiding duplication.Where would you add a new custom exception class for handling invalid user input in this framework structure?