Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r63847:ab1fa8ed1535
Date: 2013-05-04 11:50 +0200
http://bitbucket.org/pypy/pypy/changeset/ab1fa8ed1535/
Log: Port pypy hacks to sqlite test suite.
diff --git a/lib-python/3/sqlite3/test/userfunctions.py
b/lib-python/3/sqlite3/test/userfunctions.py
--- a/lib-python/3/sqlite3/test/userfunctions.py
+++ b/lib-python/3/sqlite3/test/userfunctions.py
@@ -294,12 +294,14 @@
pass
def CheckAggrNoStep(self):
+ # XXX it's better to raise OperationalError in order to stop
+ # the query earlier.
cur = self.con.cursor()
try:
cur.execute("select nostep(t) from test")
- self.fail("should have raised an AttributeError")
- except AttributeError as e:
- self.assertEqual(e.args[0], "'AggrNoStep' object has no attribute
'step'")
+ self.fail("should have raised an OperationalError")
+ except sqlite.OperationalError as e:
+ self.assertEqual(e.args[0], "user-defined aggregate's 'step'
method raised error")
def CheckAggrNoFinalize(self):
cur = self.con.cursor()
diff --git a/pypy/TODO b/pypy/TODO
--- a/pypy/TODO
+++ b/pypy/TODO
@@ -35,10 +35,6 @@
really due to the tokenizer not being fully unicode aware. The
parser can somewhat hack around this but maybe not completely
-* test_sqlite
- (Probably easy) Ports of CPython changeset fc6f90545cb4 and PyPy
- 48d194e3ac07.
-
* test_sys
* test_threading:
Missing sys.getswitchinterval(). https://bugs.pypy.org/issue1470
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit