deptry
deptry copied to clipboard
Deptry should detect missing dependencies in tests/
As of now, deptry simply ignores eveything under tests/. This means that imports that are used but not present will be noticed only at execution time, not before.
For instance, suppose I have a tests/test_sending_request.py with the following content:
import httpretty
def test_sending_request():
with httpretty.enabled():
# do stuff
pass
If httpretty is not included in the dev-dependencies, my test would crash with ModuleNotFoundError, even if I used deptry. Given that deptry can detect exactly this kind of issue for normal dependencies, I would love to see that extended to tests/ and, possibly, other folders as well.