Code

Ticket #10791: 10791-django-gis-test-runner-respect-interactive.diff

File 10791-django-gis-test-runner-respect-interactive.diff, 623 bytes (added by seanl, 5 years ago)
Line 
1Index: django/contrib/gis/tests/__init__.py
2===================================================================
3--- django/contrib/gis/tests/__init__.py        (revision 10512)
4+++ django/contrib/gis/tests/__init__.py        (working copy)
5@@ -171,7 +171,7 @@
6     old_name = settings.DATABASE_NAME
7 
8     # Creating the test spatial database.
9-    create_test_spatial_db(verbosity=verbosity)
10+    create_test_spatial_db(verbosity=verbosity, autoclobber=not interactive)
11 
12     # The suite may be passed in manually, e.g., when we run the GeoDjango test,
13     # we want to build it and pass it in due to some customizations.  Otherwise,