changeset 48:f4fd8c20511c MySQLdb

Read a default file in the test setUp. Since Python 2.4, int() will return longs if needed so make all long references int as in Python 3.0 there is no more long due to int/long unification (new ints are old longs).
author adustman
date Sun, 22 Feb 2009 20:01:31 +0000
parents c9c2c8bf1b8c
children 0a5e28ef7564
files MySQLdb/converters.py tests/test_MySQLdb_nonstandard.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MySQLdb/converters.py	Sun Feb 22 19:29:42 2009 +0000
+++ b/MySQLdb/converters.py	Sun Feb 22 20:01:31 2009 +0000
@@ -131,12 +131,12 @@
 
     FIELD_TYPE.TINY: int,
     FIELD_TYPE.SHORT: int,
-    FIELD_TYPE.LONG: long,
+    FIELD_TYPE.LONG: int,
     FIELD_TYPE.FLOAT: float,
     FIELD_TYPE.DOUBLE: float,
     FIELD_TYPE.DECIMAL: float,
     FIELD_TYPE.NEWDECIMAL: float,
-    FIELD_TYPE.LONGLONG: long,
+    FIELD_TYPE.LONGLONG: int,
     FIELD_TYPE.INT24: int,
     FIELD_TYPE.YEAR: int,
     FIELD_TYPE.SET: SET_to_Set,
--- a/tests/test_MySQLdb_nonstandard.py	Sun Feb 22 19:29:42 2009 +0000
+++ b/tests/test_MySQLdb_nonstandard.py	Sun Feb 22 20:01:31 2009 +0000
@@ -44,7 +44,7 @@
     """Test _mysql interaction internals."""
 
     def setUp(self):
-        self.conn = _mysql.connect(db='test')
+        self.conn = _mysql.connect(db='test', read_default_file="~/.my.cnf")
 
     def tearDown(self):
         self.conn.close()