You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the django-nose test runner, I'm unable to specify the order that my databases are created in, causing all of my tests to randomly fail when they are created out of order, due to tables not existing. With the default Django test runner, the default database is always created first, and you are able to specify dependencies for others, as seen here: https://docs.djangoproject.com/en/1.9/topics/testing/advanced/#controlling-creation-order-for-test-databases
django-nose was written back Django 1.2 days. I think there's quite a bit of work to sync our runner with the current maturity of the Django test runner.
If I were to take a stab at fixing this particular problem, would it be acceptable to just call dependency_ordered() in the Django test runner code, or should that functionality be vendored into this runner?
I'd try to mirror when Django calls dependency_ordered(), and look and see how that has changed across the currently supported versions. We should be mirroring the Django logic as closely as possible, and patching in nose logic where needed.
With the django-nose test runner, I'm unable to specify the order that my databases are created in, causing all of my tests to randomly fail when they are created out of order, due to tables not existing. With the default Django test runner, the default database is always created first, and you are able to specify dependencies for others, as seen here: https://docs.djangoproject.com/en/1.9/topics/testing/advanced/#controlling-creation-order-for-test-databases
This is all handled by the
dependency_ordered()
method indjango/test/runner.py
(https://github.com/django/django/blob/master/django/test/runner.py#L555). Is there any chance of using this same solution in the NoseTestSuiteRunner?The text was updated successfully, but these errors were encountered: