Skip copy tests on CockroachDB

This commit is contained in:
Daniele Varrazzo 2020-07-21 03:10:26 +01:00
parent e154cbe5aa
commit 7e1e801899

View File

@ -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,