We’ve been using coverage.py, and getting 100% coverage, but just realised that some .py files were not being imported anywhere and so were effectively dead files. We’ve just fixed the issue by making sure those files are imported and used, but is there any way that coverage.py could automatically detect this?
Coverage.py has a --source=somewhere option. It will then explore the tree at somewhere looking for files that weren’t imported. The usual value for somewhere is “.”: --source=.