summaryrefslogtreecommitdiff
path: root/tests/test_ipaddress.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-06 20:33:35 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-06 21:40:05 +0000
commit7f593d5eb0823c9d0c7dd93a404a73e6bc9610c2 (patch)
tree5b84d7b67a4891c17f4ffe3bd381328d7c74486d /tests/test_ipaddress.py
parent2e18b42db02fc79cb1a33e4e0452474f50a59335 (diff)
downloadpsycopg2-7f593d5eb0823c9d0c7dd93a404a73e6bc9610c2.tar.gz
Skip tests with server not supporting NULL in array
Diffstat (limited to 'tests/test_ipaddress.py')
-rwxr-xr-xtests/test_ipaddress.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_ipaddress.py b/tests/test_ipaddress.py
index 49413f4..bfeaae4 100755
--- a/tests/test_ipaddress.py
+++ b/tests/test_ipaddress.py
@@ -19,7 +19,8 @@ from __future__ import unicode_literals
import sys
from functools import wraps
-from testutils import unittest, ConnectingTestCase, decorate_all_tests
+import testutils
+from testutils import unittest
import psycopg2
import psycopg2.extras
@@ -39,7 +40,7 @@ def skip_if_no_ipaddress(f):
return skip_if_no_ipaddress_
-class NetworkingTestCase(ConnectingTestCase):
+class NetworkingTestCase(testutils.ConnectingTestCase):
def test_inet_cast(self):
import ipaddress as ip
cur = self.conn.cursor()
@@ -58,6 +59,7 @@ class NetworkingTestCase(ConnectingTestCase):
self.assert_(isinstance(obj, ip.IPv6Interface), repr(obj))
self.assertEquals(obj, ip.ip_interface('::ffff:102:300/128'))
+ @testutils.skip_before_postgres(8, 2)
def test_inet_array_cast(self):
import ipaddress as ip
cur = self.conn.cursor()
@@ -99,6 +101,7 @@ class NetworkingTestCase(ConnectingTestCase):
self.assert_(isinstance(obj, ip.IPv6Network), repr(obj))
self.assertEquals(obj, ip.ip_network('::ffff:102:300/128'))
+ @testutils.skip_before_postgres(8, 2)
def test_cidr_array_cast(self):
import ipaddress as ip
cur = self.conn.cursor()
@@ -122,7 +125,7 @@ class NetworkingTestCase(ConnectingTestCase):
cur.execute("select %s", [ip.ip_network('::ffff:102:300/128')])
self.assertEquals(cur.fetchone()[0], '::ffff:102:300/128')
-decorate_all_tests(NetworkingTestCase, skip_if_no_ipaddress)
+testutils.decorate_all_tests(NetworkingTestCase, skip_if_no_ipaddress)
def test_suite():