diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-03 18:47:19 -0800 |
|---|---|---|
| committer | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-10 10:51:07 -0800 |
| commit | 1a8e992fcc87b2d15911b60cc9220ec50a70a4ff (patch) | |
| tree | b24d491d6ecff95cfbee78409a037a49f182b744 /tests/test_cursor.py | |
| parent | 9de46e416e5ac1be1c5ff170d1c1ada5b8d7278f (diff) | |
| download | psycopg2-1a8e992fcc87b2d15911b60cc9220ec50a70a4ff.tar.gz | |
Use relative imports throughout tests
The tests relied on Python2 relative import semantics. Python3 changed
import semantics to always search sys.path by default. To import using a
relative path it must have a leading dot.
Forward compatible with newer Pythons.
Works towards the goal of moving tests outside of the installed package.
For more information, see PEP-328:
https://www.python.org/dev/peps/pep-0328/
Diffstat (limited to 'tests/test_cursor.py')
| -rwxr-xr-x | tests/test_cursor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_cursor.py b/tests/test_cursor.py index 5c94f42..840819a 100755 --- a/tests/test_cursor.py +++ b/tests/test_cursor.py @@ -27,7 +27,7 @@ import pickle import psycopg2 import psycopg2.extensions import unittest -from testutils import (ConnectingTestCase, skip_before_postgres, +from .testutils import (ConnectingTestCase, skip_before_postgres, skip_if_no_getrefcount, slow, skip_if_no_superuser, skip_if_windows) |
