More test failures:

py.test -D mysql tests/test_datetime.py

     def test_dateTime():
         setupClass(DateTime1)
         _now = datetime.now()
         _today = date.today()
 >       dt1 = DateTime1(col1=_now, col2=_today, col3=_now.time())

[/.../SQLObject/sqlobject/tests/test_datetime.py:22]

...

 >           Invalid: expected an date/time string of the '%H:%M:%S' 
format in the DateTimeCol 'col3', got <type 'datetime.timedelta'> 
datetime.timedelta(0, 56256) instead

[/.../SQLObject/sqlobject/col.py:947]

  1/Query   :  CREATE TABLE date_time1 (
     id INT PRIMARY KEY AUTO_INCREMENT,
     col1 DATETIME,
     col2 DATE,
     col3 TIME
)
  1/QueryIns:  INSERT INTO date_time1 (col2, col3, col1) VALUES 
('2006-09-26', '15:37:36', '2006-09-26 15:37:36')
  1/QueryIns-> 1L
  1/QueryOne:  SELECT col1, col2, col3 FROM date_time1 WHERE id = (1)
  1/QueryOne-> (datetime.datetime(2006, 9, 26, 15, 37, 36), 
datetime.date(2006, 9, 26), datetime.timedelta(0, 56256))


tests/test_enum.py[2] .F

     def testNone():
 >       setupClass(EnumWithNone)

[/.../SQLObject/sqlobject/tests/test_enum.py:28]

 >       ProgrammingError: (1064, "You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the 
right syntax to use near 'NULL)\n)' at line 3")

[/.../python2.4/site-packages/MySQLdb/connections.py:35]
- - - - - - - - - - - - -  testNone: recorded stdout - - - - - - - - - - 
- - -
  1/Query   :  DESCRIBE enum_with_none
  1/Query   :  DESCRIBE enum_with_none
  1/Query   :  DESCRIBE enum_with_none
  1/Query   :  CREATE TABLE enum_with_none (
     id INT PRIMARY KEY AUTO_INCREMENT,
     l ENUM('a', 'bcd', 'e', NULL)
)


tests/test_blob.py[1] F

     def test_BLOBCol():
         if not supports('blobData'):
             return
         setupClass(ImageData)
         data = ''.join([chr(x) for x in range(256)])

         prof = ImageData()
 >       prof.image = data

[/.../SQLObject/sqlobject/tests/test_blob.py:18]

E                   myquery = unicode(query, self.encoding)
 >                   UnicodeDecodeError: 'ascii' codec can't decode byte 
0x80 in position 167: ordinal not in range(128)

[/.../SQLObject/sqlobject/mysql/mysqlconnection.py:73]

- - - - - - - - - - - -  test_BLOBCol: recorded stdout - - - - - - - - - 
- - -
  1/Query   :  DESCRIBE image_data
  1/Query   :  DESCRIBE image_data
  1/Query   :  DESCRIBE image_data
  1/Query   :  CREATE TABLE image_data (
     id INT PRIMARY KEY AUTO_INCREMENT,
     image TEXT
)
  1/QueryIns:  INSERT INTO image_data (image) VALUES ('emptydata')
  1/QueryIns-> 1L
  1/QueryOne:  SELECT image FROM image_data WHERE id = (1)
  1/QueryOne-> ('emptydata',)
  1/Query   :  UPDATE image_data SET image = 
('\0^A^B^C^D^E^F^G\b\t\n^K^L\r^N^O^P
^Q^R^S^T^U^V^W^X^Y^ZESC^\^]^^^_ 
!"#$%&\'()*+,-./0123456789:;<=>[EMAIL PROTECTED]
PQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������
�����������������') WHERE id = (1)

tests/test_decimal.py[2]

     def test_1decimal():
         if not supports('decimalColumn'):
             return
         setupClass(DecimalTable)
         d = DecimalTable(col1=21.12)
E       assert d.col1 == 21.12
 >       assert <DecimalTable 1L col1=Decimal("21.1200")>.col1 == 
21.120000000000001

[/.../SQLObject/sqlobject/tests/test_decimal.py:21]

  1/Query   :  DESCRIBE decimal_table
  1/Query   :  DESCRIBE decimal_table
  1/Query   :  DESCRIBE decimal_table
  1/Query   :  CREATE TABLE decimal_table (
     id INT PRIMARY KEY AUTO_INCREMENT,
     col1 DECIMAL(6, 4)
)
  1/QueryIns:  INSERT INTO decimal_table (col1) VALUES (21.120000000000001)
  1/QueryIns-> 1L
  1/QueryOne:  SELECT col1 FROM decimal_table WHERE id = (1)
  1/QueryOne-> (Decimal("21.1200"),)

- - - - - - - - - - -  test_1decimal: recorded stderr - - - - - - - - - 
- - -
/.../SQLObject/sqlobject/mysql/mysqlconnection.py:74: Warning:
Data truncated for column 'col1' at row 1
   return cursor.execute(myquery)

tests/test_auto_old.py
tests/test_auto.py (same error)

     def test_classCreate(self):
         if not supports('fromDatabase'):
             return
 >       class OldAutoTest(SQLObject):

[/.../SQLObject/sqlobject/tests/test_auto_old.py:156]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _

     def columnsFromSchema(self, tableName, soClass):
         colData = self.queryAll("SHOW COLUMNS FROM %s"
                                 % tableName)
         results = []
         for field, t, nullAllowed, key, default, extra in colData:
             if field == 'id':
                 continue
             colClass, kw = self.guessClass(t)
E           if self.kw['use_unicode'] and colClass is col.StringCol:
 >           KeyError: 'use_unicode'

[/.../SQLObject/sqlobject/mysql/mysqlconnection.py:153]
- - - - - - - - - - -  test_classCreate: recorded stdout - - - - - - - - 
- - -
  1/Query   :
     CREATE TABLE IF NOT EXISTS old_auto_test (
       auto_id INT AUTO_INCREMENT PRIMARY KEY,
       first_name VARCHAR(100),
       last_name VARCHAR(200) NOT NULL,
       age INT DEFAULT NULL,
       created DATETIME NOT NULL,
       happy char(1) DEFAULT 'Y' NOT NULL,
       long_field TEXT,
       wannahavefun TINYINT DEFAULT 0 NOT NULL
     )

  1/QueryAll:  SHOW COLUMNS FROM old_auto_test
  1/QueryAll-> (('auto_id', 'int(11)', 'NO', 'PRI', 
None,'auto_increment'), ('first_name', 'varchar(100)', 'YES', '', None, 
''), ('last_name', 'varchar(200)', 'NO', '', '', ''), ('age', 'int(11)', 
'YES', '', None, ''), ('created', 'datetime', 'NO', '', '', ''), 
('happy', 'char(1)', 'NO', '', 'Y', ''), ('long_field', 'text', 'YES', 
'', None, ''), ('wannahavefun', 'tinyint(4)', 'NO', '', '0', ''))

tests/test_unicode.py

     def test_create():
 >       setup()

...

 >       OperationalError: (1170, "BLOB/TEXT column 'col1' used in key 
specification without a key length")

[/.../lib/python2.4/site-packages/MySQLdb/connections.py:35]
- - - - - - - - - - - -  test_create: recorded stdout - - - - - - - - - 
- - - -
  1/Query   :  DESCRIBE test_unicode
  1/Query   :  DESCRIBE test_unicode
  1/Query   :  DESCRIBE test_unicode
  1/Query   :  CREATE TABLE test_unicode (
     id INT PRIMARY KEY AUTO_INCREMENT,
     count INT NOT NULL UNIQUE,
     col1 TEXT NOT NULL UNIQUE,
     col2 TEXT
)

Cheers!

nathan

-- 
Nathan Edwards, Ph.D.
Center for Bioinformatics and Computational Biology
3119 Biomolecular Sciences Bldg. #296
University of Maryland, College Park, MD 20742
Phone: +1 301-405-9901
Email: [EMAIL PROTECTED]
WWWeb: http://www.umiacs.umd.edu/~nedwards

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to