Skip to content

Commit ccf2c9f

Browse files
author
Alexander Smishlajev
committed
skip mysql backend tests on any MySQL error...
...raised from Database instantiation. (if the server is not available, MySQLdb raises OperationalError, not ProgrammingError.)
1 parent aa2220c commit ccf2c9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_mysql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_mysql.py,v 1.11 2004-09-25 15:49:31 a1s Exp $
18+
# $Id: test_mysql.py,v 1.12 2004-09-26 11:30:56 a1s Exp $
1919

2020
import unittest, os, shutil, time, imp
2121

@@ -84,7 +84,7 @@ def test_suite():
8484
import MySQLdb
8585
db = mysql.Database(config, 'admin')
8686
db.close()
87-
except (MySQLdb.ProgrammingError, DatabaseError), msg:
87+
except (MySQLdb.MySQLError, DatabaseError), msg:
8888
print "Skipping mysql tests (%s)"%msg
8989
else:
9090
print 'Including mysql tests'

0 commit comments

Comments
 (0)