Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#12306 closed defect

trac.db.tests.api test failures with mysql — at Initial Version

Reported by: Christian Boos Owned by: Christian Boos
Priority: normal Milestone: 1.0.10
Component: database backend Version: 1.0dev
Severity: minor Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The table names are normalized to lower case, when queried in MySQL (on Windows only apparently). This means that the following test will fail, slightly differently according to the branch:

On 1.0-stable:

======================================================================
FAIL: test_table_names (trac.db.tests.api.ConnectionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\trac\trac\db\tests\api.py", line 502, in test_table_names
    self.assertIn(table.name, db_tables)
AssertionError: 'HOURS' not found in [u'attachment', u'auth_cookie', u'blog', u'cache', u'component', u'enum', u'hours', u'milestone', u'node_change', u'permission', u'report', u'repository', u'revision', u'session', u'session_attribute', u'system', u'ticket', u'ticket_change', u'ticket_custom', u'version', u'wiki']

On trunk:

======================================================================
FAIL: test_get_table_names (trac.db.tests.api.ConnectionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\trac\trac\db\tests\api.py", line 492, in test_get_table_names
    sorted(db.get_table_names()))
AssertionError: Lists differ: ['HOURS', 'attachment', 'auth_... != [u'attachment', u'auth_cookie'...

First differing element 0:
HOURS
attachment

Diff is 894 characters long. Set self.maxDiff to None to see it.

Change History (0)

Note: See TracTickets for help on using tickets.