diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-07-21 03:10:26 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-07-21 22:22:55 +0100 |
commit | 7e1e801899fc0c0e79abd0e87dee33e5ffd2b2df (patch) | |
tree | 6f2dc76f5bfed4c0280b84e8ed6ad292985d885d | |
parent | e154cbe5aab43e1b5a85c4467e5738a6dcd6fd69 (diff) | |
download | psycopg2-7e1e801899fc0c0e79abd0e87dee33e5ffd2b2df.tar.gz |
Skip copy tests on CockroachDB
-rwxr-xr-x | tests/test_copy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_copy.py b/tests/test_copy.py index 4fdf164..cf06fa4 100755 --- a/tests/test_copy.py +++ b/tests/test_copy.py @@ -27,7 +27,8 @@ import io import sys import string import unittest -from .testutils import (ConnectingTestCase, skip_before_postgres, slow, StringIO) +from .testutils import ConnectingTestCase, skip_before_postgres, slow, StringIO +from .testutils import crdb_version, skip_if_crdb from itertools import cycle from subprocess import Popen, PIPE @@ -58,6 +59,7 @@ class MinimalWrite(TextIOBase): return self.f.write(data) +@skip_if_crdb @skip_copy_if_green class CopyTests(ConnectingTestCase): @@ -67,6 +69,8 @@ class CopyTests(ConnectingTestCase): def _create_temp_table(self): curs = self.conn.cursor() + if crdb_version(self.conn) is not None: + curs.execute("SET experimental_enable_temp_tables = 'on'") curs.execute(''' CREATE TEMPORARY TABLE tcopy ( id serial PRIMARY KEY, |