diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-08-17 23:50:04 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-08-17 23:50:04 +0100 |
commit | 423a663306786114f3f64580b28b8bb803747dd5 (patch) | |
tree | c2e672b4d4036753586cd09eaa42d8496260982d | |
parent | f339bb30fb0fab1147edb3593e86c67ca38fb592 (diff) | |
download | psycopg2-cockroachdb-tests.tar.gz |
Python 2 compatibilitycockroachdb-tests
-rw-r--r-- | tests/testutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index 88ca135..2b5bbf9 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -38,7 +38,7 @@ from ctypes.util import find_library import psycopg2 import psycopg2.errors import psycopg2.extensions -from psycopg2.compat import PY2, PY3, text_type +from psycopg2.compat import PY2, PY3, string_types, text_type from .testconfig import green, dsn, repl_dsn @@ -454,7 +454,7 @@ def skip_if_crdb(reason, conn=None, version=None): "== 20.1.3": the test will be skipped only if the version matches. """ - if not isinstance(reason, str): + if not isinstance(reason, string_types): raise TypeError("reason should be a string, got %r instead" % reason) if conn is not None: |