[pypy-svn] r73033 - pypy/pysqlite2/test

arigo at codespeak.net arigo at codespeak.net
Sun Mar 28 17:42:11 CEST 2010


Author: arigo
Date: Sun Mar 28 17:42:10 2010
New Revision: 73033

Modified:
   pypy/pysqlite2/test/userfunctions.py
Log:
Asking for -100 arguments gives a SQLITE_MISUSE in at least one version of
libsqlite3.so.  It makes sense I suppose.  Fix test.


Modified: pypy/pysqlite2/test/userfunctions.py
==============================================================================
--- pypy/pysqlite2/test/userfunctions.py	(original)
+++ pypy/pysqlite2/test/userfunctions.py	Sun Mar 28 17:42:10 2010
@@ -140,8 +140,9 @@
     def CheckFuncErrorOnCreate(self):
         try:
             self.con.create_function("bla", -100, lambda x: 2*x)
-            self.fail("should have raised an OperationalError")
-        except sqlite.OperationalError:
+            self.fail("should have raised an OperationalError "
+                      "or ProgrammingError")
+        except (sqlite.OperationalError, sqlite.ProgrammingError):
             pass
 
     def CheckFuncRefCount(self):



More information about the Pypy-commit mailing list