diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-01 19:53:30 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-01 19:57:37 -0800 |
commit | f5703dc3e55008b03aad4db8d8f3c5fa12dbae86 (patch) | |
tree | afbb7a1f165ddf529fc95376397dfa02bee383c8 /tests/test_sql.py | |
parent | a51160317c680662c52e4a1a6b4d11beae37f205 (diff) | |
download | psycopg2-f5703dc3e55008b03aad4db8d8f3c5fa12dbae86.tar.gz |
Use builtin function next() throughout project
Available since Python 2.6. Use of .next() is deprecated and not
supported in Python 3. Forward compatible with modern Python.
https://docs.python.org/2/library/functions.html#next
Diffstat (limited to 'tests/test_sql.py')
-rwxr-xr-x | tests/test_sql.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_sql.py b/tests/test_sql.py index 2e12ba6..08f43b4 100755 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -344,11 +344,11 @@ class ComposedTest(ConnectingTestCase): def test_iter(self): obj = sql.Composed([sql.SQL("foo"), sql.SQL('bar')]) it = iter(obj) - i = it.next() + i = next(it) self.assertEqual(i, sql.SQL('foo')) - i = it.next() + i = next(it) self.assertEqual(i, sql.SQL('bar')) - self.assertRaises(StopIteration, it.next) + self.assertRaises(StopIteration, next, it) class PlaceholderTest(ConnectingTestCase): |