summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2020-08-17 22:23:10 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2020-08-17 22:31:48 +0100
commit5d2e51e76ee29ece1c153c2bf8a2c396f4a23ade (patch)
tree768b5174851b9aae183564530ab34de53ec8863d
parent6d8382b7ed8df61ee2cb90bc43c5150f9fb56664 (diff)
downloadpsycopg2-5d2e51e76ee29ece1c153c2bf8a2c396f4a23ade.tar.gz
Added ticket numbers for the tests skipped on crdb
-rw-r--r--tests/testutils.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/testutils.py b/tests/testutils.py
index 58190fe..0afabc1 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -454,6 +454,10 @@ def skip_if_crdb(reason, conn=None):
if conn is not None:
if crdb_version(conn) is not None:
+ if reason in crdb_reasons:
+ reason = (
+ "%s (https://github.com/cockroachdb/cockroach/issues/%s)"
+ % (reason, crdb_reasons[reason]))
raise unittest.SkipTest("not supported on CockroachDB: %s" % reason)
@decorate_all_tests
@@ -468,6 +472,29 @@ def skip_if_crdb(reason, conn=None):
return skip_if_crdb_
+# mapping from reason description to ticket number
+crdb_reasons = {
+ "2-phase commit": 22329,
+ "backend pid": 35897,
+ "cancel": 41335,
+ "cast adds tz": 51692,
+ "cidr": 18846,
+ "composite": 27792,
+ "copy": 41608,
+ "deferrable": 48307,
+ "encoding": 35882,
+ "hstore": 41284,
+ "infinity date": 41564,
+ "interval style": 35807,
+ "large objects": 243,
+ "named cursor": 41412,
+ "nested array": 32552,
+ "notify": 41522,
+ "range": 41282,
+ "stored procedure": 1751,
+}
+
+
class py3_raises_typeerror(object):
def __enter__(self):
pass