The expected behaviour of Django test is loading the models and serializers first, so the coverage should be 100% for them except there are some other implementations (e.g. To String definition, model methods, custom save/delete, validators, or path getter for file upload). So, I've tried three approaches to workaround
django-nose bug and achieving that:
coverageon GitLab CI while maintaining the
django_nosesettings, FAILED (both Windows and Linux).
django_nose, SUCCESS on Windows (coverage 90%, models/serializers no longer 0%), FAILED on Linux
django-nosefrom requirements and use the standard
coverageimport still in
manage.pyto maintain existing workflow. SUCCESS on both Windows and Linux (coverage 90%, models/serializers no longer 0%), but at the expense of losing
stdoutgrouping for each tests, making it harder to debug tests in general. This is the latest one I used right now.
Closes #198 (closed).