Storm 0.15 sqlite test failures on Python 2.5

Bug #427584 reported by Michel Lind
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
New
Undecided
Unassigned

Bug Description

Both test_rowcount_delete, from tests.databases.sqlite.SQLite{File,Memory}Test, fail with assertion errors on Python 2.5 from Fedora 10.

Relevant package version:
$ rpm -q python python-sqlite2
python-2.5.2-1.fc10.x86_64
python-sqlite2-2.3.5-1.fc10.x86_64

Note: the same tests fail identically when using Python's bundled sqlite3 module

======================================================================
FAIL: test_rowcount_delete (tests.databases.sqlite.SQLiteFileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fedora/salimma/rpmbuild/BUILD/storm-0.15/tests/mocker.py", line 10
2, in test_method_wrapper
    result = test_method()
  File "/home/fedora/salimma/rpmbuild/BUILD/storm-0.15/tests/databases/base.py",
 line 390, in test_rowcount_delete
    self.assertEquals(result.rowcount, 2)
AssertionError: 0 != 2

======================================================================
FAIL: test_rowcount_delete (tests.databases.sqlite.SQLiteMemoryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fedora/salimma/rpmbuild/BUILD/storm-0.15/tests/mocker.py", line 10
2, in test_method_wrapper
    result = test_method()
  File "/home/fedora/salimma/rpmbuild/BUILD/storm-0.15/tests/databases/base.py",
 line 390, in test_rowcount_delete
    self.assertEquals(result.rowcount, 2)
AssertionError: 0 != 2

Revision history for this message
James Henstridge (jamesh) wrote :

I can't reproduce this problem locally. What version of sqlite are you running there?

Looking at the sqlite release history (http://sqlite.org/changes.html), one of the fixes in 3.6.5 sounds relevant:

    Fixed the truncate optimization so that sqlite3_changes() and
    sqlite3_total_changes() interfaces and the count_changes pragma
    return the correct values.

The test in question is checking rowcount after executing "DELETE FROM test", which would trigger the truncate optimisation code path.

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.