Hi Free,

when running Storm tests under OS X (10.8.4, Python 2.6.8, SQLite 3.7.17) I 
also noticed that the following two tests fail:

FAIL: test_result_set_count_sliced (tests.sqlobject.SQLObjectTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/markus/Desktop/storm-0.19/tests/mocker.py", line 102, in 
test_method_wrapper
    result = test_method()
  File "/Users/markus/Desktop/storm-0.19/tests/sqlobject.py", line 755, in 
test_result_set_count_sliced
    self.assertEquals(len(list(sliced_result)), 1)
AssertionError: 0 != 1

======================================================================
FAIL: test_find_slice_offset (tests.store.sqlite.SQLiteStoreTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/markus/Desktop/storm-0.19/tests/mocker.py", line 102, in 
test_method_wrapper
    result = test_method()
  File "/Users/markus/Desktop/storm-0.19/tests/store/base.py", line 754, in 
test_find_slice_offset
    (10, "Title 30")])
AssertionError: [] != [(20, 'Title 20'), (10, 'Title 30')]

These tests create a SELECT statement with LIMIT set to sys.maxint. Reducing 
sys.maxint by 1 in storm.databases.sqlite.compile_select_sqlite makes these 
tests pass again:

--- storm/databases/sqlite.py.orig      2013-06-09 12:35:28.000000000 +0200
+++ storm/databases/sqlite.py   2013-06-09 12:35:28.000000000 +0200
@@ -48,7 +48,7 @@
 @compile.when(Select)
 def compile_select_sqlite(compile, select, state):
     if select.offset is not Undef and select.limit is Undef:
-        select.limit = sys.maxint
+        select.limit = sys.maxint - 1
     statement = compile_select(compile, select, state)
     if state.context is SELECT:
         # SQLite breaks with (SELECT ...) UNION (SELECT ...), so we

Best regards,
Markus Kemmerling

Am 26.06.2013 um 14:45 schrieb Free Ekanayaka <[email protected]>:

> Hi folks,
> 
> I didn't really go on with the 0.20 release, see:
> 
> https://lists.ubuntu.com/archives/storm/2013-January/001464.html
> 
> But I'd like to it now. Please step up if you think there's something we
> should block on, otherwise I'll prepare the tarball in the next few days.
> 
> Cheers,
> 
> Free
> 
> -- 
> storm mailing list
> [email protected]
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/storm
> 


-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to