The unit tests should be in directory `tests/infra`. You can also check if it is possible to move `with_custom_state` to `tests/infra/context.py`.