diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-08-17 21:27:25 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-08-17 21:27:25 +0100 |
commit | 6d8382b7ed8df61ee2cb90bc43c5150f9fb56664 (patch) | |
tree | aef88cabb118170c0b06666e15732cd498ce88a9 /tests/testutils.py | |
parent | 513b0019b19d10fdb28ef8a80cf6ab0022109f2c (diff) | |
download | psycopg2-6d8382b7ed8df61ee2cb90bc43c5150f9fb56664.tar.gz |
Added missing reasons for crdb skip
Added check to make sure a reason must be passed.
Diffstat (limited to 'tests/testutils.py')
-rw-r--r-- | tests/testutils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index 12b0bcf..58190fe 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -449,6 +449,9 @@ def skip_if_crdb(reason, conn=None): Or as a normal function if the *conn* argument is passed. """ + if not isinstance(reason, str): + raise TypeError("reason should be a string, got %r instead" % reason) + if conn is not None: if crdb_version(conn) is not None: raise unittest.SkipTest("not supported on CockroachDB: %s" % reason) |