Done some tests and I think that line can be completly removed.

On 7 Maj, 11:33, SeC <[email protected]> wrote:
> Maybe because there are to testUnicode. First one(this one doesn't
> work):
>    def testUnicode(self):
>         """Bug#177265: unicode queries throw errors"""
>         self.db.select('person', where='name=$name', vars={'name':
> u'\xf4'})
>
> second one(this one works):
>   def testUnicode(self):
>         db = webtest.setup_database(self.dbname)
>         self.db.insert('person', False, name='user')
>         name = db.select('person')[0].name
>         self.assertEquals(type(name), unicode)
>
> Anyway I made a quick patch to fix this, change line 951 in web/db.py
> to:
> elif isinstance(val, str): return val.decode(self.encoding)
>
> It looks like sqlite3 can now handle unicode insert.
>
> On 7 Maj, 11:13, Anand Chitipothu <[email protected]> wrote:
>
> > 2009/5/7 SeC <[email protected]>:
>
> > > Hey.
> > > I saw there are two def unicodeTest def's in test/db.py, so I renamed
> > > second one to unicodeTest2.
> > > running: python test/db.py SqliteTest.testUnicode
> > > ======================================================================
> > > ERROR: Bug#177265: unicode queries throw errors
> > > ----------------------------------------------------------------------
>
> > works for me.
> > Tried on Mac OS X with Python2.5 and Ubuntu 8.04 with Python 2.5.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to