This code works correctly in:
- emacs: M-x python-pytest-dispatch
- shell: pytest
- vscode: discover tests correctly (python plugin)
This structure keeps tests discoverable.
pwgen/ ├── add.py: > def add(a, b): > return a + b ├── __init__.py > pass └── tests/ ├── __init__.py > pass ├── test_add.py > from pwgen import add > def test_df(): > assert add.add(1, 2) == 3
pip install pytest-watch
ptw