diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-12-01 06:39:39 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-12-01 06:39:39 +0000 |
| commit | e7e991e86b9f4a3e4e89bcbc08dec32606538250 (patch) | |
| tree | 77ac5485f20829ef1423b02fd87ee2f1d71526ca | |
| parent | 3bf29d21847ae4d32f7a1d6ec2f205ef3a58efc1 (diff) | |
Fixed #964 -- Added helpful error message if there's a problem in running the unit tests. Thanks, paolo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rwxr-xr-x | tests/runtests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index fbe20807ce..30e1cd403b 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -100,8 +100,9 @@ class TestRunner: self.output(1, "Creating test database") try: cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME) - except: - confirm = raw_input("The test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME) + except Exception, e: + sys.stderr.write("Got an error creating the test database: %s\n" % e) + confirm = raw_input("It appears the test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME) if confirm == 'yes': cursor.execute("DROP DATABASE %s" % TEST_DATABASE_NAME) cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME) |
