From: Nathan E. <ned...@um...> - 2006-09-26 20:00:00
|
More test failures: py.test -D mysql tests/test_datetime.py def test_dateTime(): setupClass(DateTime1) _now =3D datetime.now() _today =3D date.today() > dt1 =3D DateTime1(col1=3D_now, col2=3D_today, col3=3D_now.time()= ) [/.../SQLObject/sqlobject/tests/test_datetime.py:22] ... > Invalid: expected an date/time string of the '%H:%M:%S'=20 format in the DateTimeCol 'col3', got <type 'datetime.timedelta'>=20 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=20 ('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 =3D (1) 1/QueryOne-> (datetime.datetime(2006, 9, 26, 15, 37, 36),=20 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;=20 check the manual that corresponds to your MySQL server version for the=20 right syntax to use near 'NULL)\n)' at line 3") [/.../python2.4/site-packages/MySQLdb/connections.py:35] - - - - - - - - - - - - - testNone: recorded stdout - - - - - - - - - -=20 - - - 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 =3D ''.join([chr(x) for x in range(256)]) prof =3D ImageData() > prof.image =3D data [/.../SQLObject/sqlobject/tests/test_blob.py:18] E myquery =3D unicode(query, self.encoding) > UnicodeDecodeError: 'ascii' codec can't decode byte=20 0x80 in position 167: ordinal not in range(128) [/.../SQLObject/sqlobject/mysql/mysqlconnection.py:73] - - - - - - - - - - - - test_BLOBCol: recorded stdout - - - - - - - - -=20 - - - 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 =3D (1) 1/QueryOne-> ('emptydata',) 1/Query : UPDATE image_data SET image =3D=20 ('\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^\^]^^^_=20 !"#$%&\'()*+,-./0123456789:;<=3D>?@ABCDEFGHIJKLMNO PQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD') WHERE id =3D (1) tests/test_decimal.py[2] def test_1decimal(): if not supports('decimalColumn'): return setupClass(DecimalTable) d =3D DecimalTable(col1=3D21.12) E assert d.col1 =3D=3D 21.12 > assert <DecimalTable 1L col1=3DDecimal("21.1200")>.col1 =3D=3D=20 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.12000000000000= 1) 1/QueryIns-> 1L 1/QueryOne: SELECT col1 FROM decimal_table WHERE id =3D (1) 1/QueryOne-> (Decimal("21.1200"),) - - - - - - - - - - - test_1decimal: recorded stderr - - - - - - - - -=20 - - - /.../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] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _=20 _ _ _ _ def columnsFromSchema(self, tableName, soClass): colData =3D self.queryAll("SHOW COLUMNS FROM %s" % tableName) results =3D [] for field, t, nullAllowed, key, default, extra in colData: if field =3D=3D 'id': continue colClass, kw =3D 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 - - - - - - - -=20 - - - 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',=20 None,'auto_increment'), ('first_name', 'varchar(100)', 'YES', '', None,=20 ''), ('last_name', 'varchar(200)', 'NO', '', '', ''), ('age', 'int(11)',=20 'YES', '', None, ''), ('created', 'datetime', 'NO', '', '', ''),=20 ('happy', 'char(1)', 'NO', '', 'Y', ''), ('long_field', 'text', 'YES',=20 '', None, ''), ('wannahavefun', 'tinyint(4)', 'NO', '', '0', '')) tests/test_unicode.py def test_create(): > setup() ... > OperationalError: (1170, "BLOB/TEXT column 'col1' used in key=20 specification without a key length") [/.../lib/python2.4/site-packages/MySQLdb/connections.py:35] - - - - - - - - - - - - test_create: recorded stdout - - - - - - - - -=20 - - - - 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 --=20 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: ned...@um... WWWeb: http://www.umiacs.umd.edu/~nedwards |