Commit 720e86a4 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Test that Cursor.__iter__() returns self

parent 63052c55
......@@ -54,3 +54,13 @@ class PhoenixDatabaseAPI20Test(dbapi20.DatabaseAPI20Test):
con.readonly = False
self.assertFalse(con.readonly)
con.close()
def test_iter(self):
# https://www.python.org/dev/peps/pep-0249/#iter
con = self._connect()
try:
cur = con.cursor()
if hasattr(cur,'__iter__'):
self.assertIs(cur,iter(cur))
finally:
con.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment