Comment 7 for bug 709527

Revision history for this message
Matt Haggard (iffy) wrote :

James: It was the unicode. I apologize for the buggy bug -- I thought I had tried with unicode and seen the same result.

>>> from storm.locals import *
>>> db = create_database('sqlite:?synchronous=OFF&timeout=0')
>>> s = Store(db)
>>> s.execute("CREATE TABLE test (id INTEGER PRIMARY KEY, title VARCHAR)")
<storm.databases.sqlite.SQLiteResult object at 0x10123cc50>
>>> s.execute("INSERT INTO test VALUES (10, 'foo')")
<storm.databases.sqlite.SQLiteResult object at 0x10123cc90>
>>> s.commit()
>>>
>>> r = s.execute("SELECT * FROM test WHERE title = ?", (u'foo',))
>>>
>>> a = r.get_one()
>>> print a
(10, u'foo')
>>> assert a == (10, 'foo')
>>>