An implementation of autotest for Python inspired by autotest and guard.
autopytest observes file change events and whenever you save a file it runs the appropriate test and upon success runs your entire test suite.
# pip
pip install autopytest
# poetry
poetry add autopytestIn your pyproject.toml add the following.
[tool.autopytest]
source_directories = ["app", "lib"]
test_directory = "tests"Test naming is currently important. For example given the above configuration if app/models/order.py is edited we will attempt to locate and run tests/app/models/test_order.py
cd {project}
autopytest
autopytest {path}