#17762: Multi-db apps (no Django test suite) testing fails to create in-memory
sqlite DBs
-------------------------------------+-------------------------------------
     Reporter:  agriffis             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  1                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by ramiro):

 Replying to [comment:4 agriffis]:
 > Replying to [comment:3 ramiro]:
 > > Could you give us more details how are you getting the ''"Django fails
 to create multiple in-memory SQLite databases, instead it creates only one
 (which is populated only with the table definitions for the default DB)"''
 failure you describe so others can reproduce it?
 >
 > Thanks for the time you've put into this, and the instructions for
 creating the mdb app! I wasn't sure how to quickly make an isolated test
 case for this. I see the problem using
 > [...]
 >
 > which results in:
 >
 > {{{
 > $ ./manage.py test -v2 mdb 2>&1 | grep Creating
 > Creating test database for alias 'default' (':memory:')...
 > Creating tables ...
 > [...]
 >

 That's weird will try to reproduce it.

 > Regarding:
 > > The patch doesn't seem to make any sense, though.
 >
 > The base `test_db_signature()` distinguishes unique databases by the
 combination of `ENGINE`, `NAME`, etc.  SQLite databases are distinguished
 by `NAME` except for `':memory:'` and `''` (on-disk temporary DB) which
 are unique per-connection even if the `NAME` is the same as another
 connection. I figured `id(self.connection)` accurately identifies unique
 databases in this case.  Does it make sense with that explanation?

 I understand that part. I was talking about the fact that the `name`
 variable is used without being defined before so the code broken.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17762#comment:7>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to