Tests failing (shows on Windows)

Bug #501287 reported by Geert JM Vanderkelen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
Fix Released
Low
Geert JM Vanderkelen

Bug Description

Some tests are failing on Windows, but they are showing some problems in the way results are compared in the unittests. Thus not really a Windows problem, just need to remove the lazy checks.

======================================================================
FAIL: MySQLCursorBuffered object execute()-method
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\test_cursor.py", line 712, in test_execute
    self.assertEqual(exp, self.c._warnings)
AssertionError: [(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'a'"),
(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'b'")] != [(u'Warning',
1292L, u"Truncated incorrect DOUBLE value: 'b'"), (u'Warning', 1292L, u"Truncate
d incorrect DOUBLE value: 'a'")]

======================================================================
FAIL: MySQLCursor object _fetch_warnings()-method
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\test_cursor.py", line 412, in test__fetch_warnings
    self.assertEqual(exp, self.c._fetch_warnings())
AssertionError: [(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'a'"),
(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'b'")] != [(u'Warning',
1292L, u"Truncated incorrect DOUBLE value: 'b'"), (u'Warning', 1292L, u"Truncate
d incorrect DOUBLE value: 'a'")]

======================================================================
FAIL: MySQLCursor object execute()-method
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\test_cursor.py", line 449, in test_execute
    self.assertEqual(exp, self.c._warnings)
AssertionError: [(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'a'"),
(u'Warning', 1292L, u"Truncated incorrect DOUBLE value: 'b'")] != [(u'Warning',
1292L, u"Truncated incorrect DOUBLE value: 'b'"), (u'Warning', 1292L, u"Truncate
d incorrect DOUBLE value: 'a'")]

======================================================================
FAIL: lp:499362 Setting character set at connection fails
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\test_bugs.py", line 204, in test_charset
    self.assertEqual(exp1, res1)
AssertionError: [(u'CHARACTER_SET_CONNECTION', u'latin7'), (u'CHARACTER_SET_CLIE
NT', u'latin7'), (u'CHARACTER_SET_RESULTS', u'latin7')] != [(u'CHARACTER_SET_CON
NECTION', u'latin7'), (u'CHARACTER_SET_RESULTS', u'latin7'), (u'CHARACTER_SET_CL
IENT', u'latin7')]

======================================================================
FAIL: examples/inserts.py
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\test_examples.py", line 64, in test_inserts
    self._exec_main(exp)
  File ".\tests\test_examples.py", line 40, in _exec_main
    self.fail(e)
AssertionError: Failed converting row to Python types; invalid literal for int()
 with base 10: 'abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca
bcabcabcabcabcabcabcabcabcabcabcabc' (field id)

----------------------------------------------------------------------

Tags: tests

Related branches

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

(The last failure in tests is moving to another bug report)

revno: 175
committer: Geert Vanderkelen <email address hidden>
branch nick: myconnpy-bug501287
timestamp: Thu 2009-12-31 12:35:59 +0100
message:
  Fix in unittests for comparing results from MySQL and what is expected

  * Order can't be guaranteed for result of certian commands, e.g.
    SHOW WARNIGS, so we use MySQLConnectorTests.cmpResult to do the
    comparison row by row.
  * Most tests cases (if not all) are updated to use the new comparison
    method.

Changed in myconnpy:
status: Confirmed → Fix Committed
Changed in myconnpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.