Django test (pytest) that checks that templates render without errors.
Uses pytest.mark.parameterize
to test each template as an individual test.
Uses Django's Loader
to find templates.
This will also find templates in third-party apps (i.e. in your virtualenv).
If you want to exclude these from being tested you will need to modify the code to fit your own project structure.
The above code assumes a list of local apps in the settings file (INSTALLED_APPS = VENV_APPS + LOCAL_APPS
).