django/django — pull request #3677 by coldmind (2014-12-03 23:31:27+00:00)
Title: [WIP] (Need some help) Fixed #12118 - Added ability to share sqlite in-memory database in threa...

Sqlite3 with version >=3.7.13 can share in-memory database between threads.
Built-in sqlite module of python2 comes without ability to specify in-memory database name as URI, but since python3.4 can do this,
So, need to use database name as URI to prevent fails in tests.
I'm returning URI manually, if database name is specified as `:memory:` in settings to give ability to use shared cache without specifying it manually (people will have this after update).

**Need some help:**
I tested that on different test cases, and also added django test.
When running `python runtests.py backends` it works fine, but running `python runtests.py test_runner backends` fails (the exception is like in-memory database is not in shared mode in that moment). I found that `tests.test_runner.tests.Sqlite3InMemoryTestDbs` is causing the problem, and I can not figure out why.
Everything else seems works fine, all tests (except problem described above) are passing in python2/python3.