diff options
author | Gerhard Häring <gh@ghaering.de> | 2006-04-23 15:24:26 +0000 |
---|---|---|
committer | Gerhard Häring <gh@ghaering.de> | 2006-04-23 15:24:26 +0000 |
commit | 3e99c0ad649de0393d9a8af17f34d9d1f55f4ab2 (patch) | |
tree | eccb1576b1380f17d880133f1fbf92df8456295d /Lib/sqlite3/test/userfunctions.py | |
parent | 5ef9d9fdb93cd5bd5179d8ce63c28248a4614d44 (diff) | |
download | cpython-git-3e99c0ad649de0393d9a8af17f34d9d1f55f4ab2.tar.gz |
Updated the sqlite3 module to the external pysqlite 2.2.2 version.
Diffstat (limited to 'Lib/sqlite3/test/userfunctions.py')
-rw-r--r-- | Lib/sqlite3/test/userfunctions.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py index ff7db9cdb7..78656e7e33 100644 --- a/Lib/sqlite3/test/userfunctions.py +++ b/Lib/sqlite3/test/userfunctions.py @@ -134,6 +134,13 @@ class FunctionTests(unittest.TestCase): def tearDown(self): self.con.close() + def CheckFuncErrorOnCreate(self): + try: + self.con.create_function("bla", -100, lambda x: 2*x) + self.fail("should have raised an OperationalError") + except sqlite.OperationalError: + pass + def CheckFuncRefCount(self): def getfunc(): def f(): @@ -251,6 +258,13 @@ class AggregateTests(unittest.TestCase): #self.con.close() pass + def CheckAggrErrorOnCreate(self): + try: + self.con.create_function("bla", -100, AggrSum) + self.fail("should have raised an OperationalError") + except sqlite.OperationalError: + pass + def CheckAggrNoStep(self): cur = self.con.cursor() cur.execute("select nostep(t) from test") |