Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r89547:03c02638a180
Date: 2017-01-13 17:44 +0100
http://bitbucket.org/pypy/pypy/changeset/03c02638a180/
Log: Apply the test fix in CPython 3.5.trunk
diff --git a/lib-python/3/sqlite3/test/factory.py
b/lib-python/3/sqlite3/test/factory.py
--- a/lib-python/3/sqlite3/test/factory.py
+++ b/lib-python/3/sqlite3/test/factory.py
@@ -183,10 +183,12 @@
def CheckFakeCursorClass(self):
# Issue #24257: Incorrect use of PyObject_IsInstance() caused
# segmentation fault.
+ # Issue #27861: Also applies for cursor factory.
class FakeCursor(str):
__class__ = sqlite.Cursor
- cur = self.con.cursor(factory=FakeCursor)
- self.assertRaises(TypeError, sqlite.Row, cur, ())
+ self.con.row_factory = sqlite.Row
+ self.assertRaises(TypeError, self.con.cursor, FakeCursor)
+ self.assertRaises(TypeError, sqlite.Row, FakeCursor(), ())
def tearDown(self):
self.con.close()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit