summaryrefslogtreecommitdiff
path: root/tests/test_copy.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-02 01:53:50 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-02 01:53:50 +0000
commitf24de0357ff4472aa8bb283980ea27b3ddd722e4 (patch)
tree70021306cd0905879dcb027034aaf1bf3a4824c2 /tests/test_copy.py
parent9ca51e0ed921270b2c641959ffeeb2ca9f58809b (diff)
downloadpsycopg2-manylinux.tar.gz
Allow skipping the slow testmanylinux
It's not so much about tests being slow: some just get stuck and timeout travis. Skipped all tests taking about more than 0.2s to run on my laptop. Fast testing takes about 8s instead of 24.
Diffstat (limited to 'tests/test_copy.py')
-rwxr-xr-xtests/test_copy.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_copy.py b/tests/test_copy.py
index ac42c98..8cbe4ea 100755
--- a/tests/test_copy.py
+++ b/tests/test_copy.py
@@ -24,8 +24,8 @@
import sys
import string
-from testutils import unittest, ConnectingTestCase, decorate_all_tests
-from testutils import skip_if_no_iobase, skip_before_postgres
+from testutils import (unittest, ConnectingTestCase, decorate_all_tests,
+ skip_if_no_iobase, skip_before_postgres, slow)
from cStringIO import StringIO
from itertools import cycle, izip
from subprocess import Popen, PIPE
@@ -77,6 +77,7 @@ class CopyTests(ConnectingTestCase):
data text
)''')
+ @slow
def test_copy_from(self):
curs = self.conn.cursor()
try:
@@ -84,6 +85,7 @@ class CopyTests(ConnectingTestCase):
finally:
curs.close()
+ @slow
def test_copy_from_insane_size(self):
# Trying to trigger a "would block" error
curs = self.conn.cursor()
@@ -120,6 +122,7 @@ class CopyTests(ConnectingTestCase):
self.assertRaises(ZeroDivisionError,
curs.copy_from, MinimalRead(f), "tcopy", columns=cols())
+ @slow
def test_copy_to(self):
curs = self.conn.cursor()
try: