django-test-migrations icon indicating copy to clipboard operation
django-test-migrations copied to clipboard

use `pytester` to test our pytest plugin

Open skarzi opened this issue 5 years ago • 0 comments

django_test_migration is growing, so it's pytest plugin also, e.g. in #138 more logic was added to it. Currently, most tests use subprocess to run pytest and make some assertions on its output. The following approach is limited, it requires quite much code in each test and it runs pytest on all project's tests by default. pytest has pytester plugin that is really useful for testing custom pytest plugins, so it will be nice to add more detailed tests of our django_test_migration plugin using pytester. We could also try to remove pytest_plugin from the coverage:run omit option, because it should be covered by tests then.

skarzi avatar Oct 05 '20 07:10 skarzi