#24290: postgres_tests fail ungracefully if psycopg2 isn't installed
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: | joelburton
Cleanup/optimization | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: 1.8 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):
* keywords: => 1.8
* needs_better_patch: 0 => 1
* easy: 1 => 0
Comment:
There is a new problem on master (which affects 1.8 too, but it's a
`RemovedInDjango19Warning` instead of a `RuntimeError`:
{{{
$ ./runtests.py postgres_tests
...
Model class postgres_tests.models.IntegerArrayModel doesn't declare
an explicit app_label and either isn't in an application in INSTALLED_APPS
or else was imported before its application was loaded.
}}}
It's caused by the
[https://github.com/django/django/blob/8ec306a3a90aa2ec0baa4c9d8df68f0d49947a2c/tests/runtests.py#L87-L88
hack in runtests.py] to omit the `postgres_tests` app when not running
with a postgresql database (to avoid trying to apply the migrations when
not in postgresql). I'm attaching a patch I experimented with, but there
are still unsolved problems with it.
--
Ticket URL: <https://code.djangoproject.com/ticket/24290#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.12643e8379a807e3b8ea07d56396eec5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.