mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Merge remote-tracking branch 'jdufresne/skip-before'
This commit is contained in:
commit
e0ce35ef72
|
@ -26,7 +26,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
|
||||||
from testutils import (unittest, skip_before_python, skip_before_postgres,
|
from testutils import (unittest, skip_before_postgres,
|
||||||
ConnectingTestCase, skip_copy_if_green, script_to_py3, slow)
|
ConnectingTestCase, skip_copy_if_green, script_to_py3, slow)
|
||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
|
@ -276,7 +276,6 @@ class ExceptionsTestCase(ConnectingTestCase):
|
||||||
self.assertEqual(e.diag.constraint_name, "chk_eq1")
|
self.assertEqual(e.diag.constraint_name, "chk_eq1")
|
||||||
self.assertEqual(e.diag.datatype_name, None)
|
self.assertEqual(e.diag.datatype_name, None)
|
||||||
|
|
||||||
@skip_before_python(2, 5)
|
|
||||||
def test_pickle(self):
|
def test_pickle(self):
|
||||||
import pickle
|
import pickle
|
||||||
cur = self.conn.cursor()
|
cur = self.conn.cursor()
|
||||||
|
@ -291,7 +290,6 @@ class ExceptionsTestCase(ConnectingTestCase):
|
||||||
self.assertEqual(e.pgcode, e1.pgcode)
|
self.assertEqual(e.pgcode, e1.pgcode)
|
||||||
self.assert_(e1.cursor is None)
|
self.assert_(e1.cursor is None)
|
||||||
|
|
||||||
@skip_before_python(2, 5)
|
|
||||||
def test_pickle_connection_error(self):
|
def test_pickle_connection_error(self):
|
||||||
# segfaults on psycopg 2.5.1 - see ticket #170
|
# segfaults on psycopg 2.5.1 - see ticket #170
|
||||||
import pickle
|
import pickle
|
||||||
|
|
|
@ -272,7 +272,6 @@ class TypesBasicTests(ConnectingTestCase):
|
||||||
o2 = self.execute("select %s;", (o1,))
|
o2 = self.execute("select %s;", (o1,))
|
||||||
self.assertEqual(memoryview, type(o2[0]))
|
self.assertEqual(memoryview, type(o2[0]))
|
||||||
|
|
||||||
@testutils.skip_before_python(2, 6)
|
|
||||||
def testAdaptBytearray(self):
|
def testAdaptBytearray(self):
|
||||||
o1 = bytearray(range(256))
|
o1 = bytearray(range(256))
|
||||||
o2 = self.execute("select %s;", (o1,))
|
o2 = self.execute("select %s;", (o1,))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user