mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #33173 -- Fixed destroying test databases when running tests in parallel using spawn on Windows.
Thanks Simon Willison for inspiration.
This commit is contained in:
parent
02940ebce1
commit
80777d30b3
@ -104,6 +104,7 @@ class DatabaseCreation(BaseDatabaseCreation):
|
||||
elif multiprocessing.get_start_method() == "spawn":
|
||||
ondisk_db = sqlite3.connect(target_database_name, uri=True)
|
||||
self.connection.connection.backup(ondisk_db)
|
||||
ondisk_db.close()
|
||||
|
||||
def _destroy_test_db(self, test_database_name, verbosity):
|
||||
if test_database_name and not self.is_in_memory_db(test_database_name):
|
||||
|
Loading…
Reference in New Issue
Block a user