summaryrefslogtreecommitdiff
path: root/tests/testutils.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-02-16 18:07:28 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-02-16 18:12:52 +0100
commit3b7c083c3d92b7c1cd22c5af53b9ee18dc331db3 (patch)
treee9d72b57de4fa5e7ac7ad9dcc395bad5684a98c6 /tests/testutils.py
parent7c7bbb9742734d1a1c0bc808d9730113249be4eb (diff)
downloadpsycopg2-3b7c083c3d92b7c1cd22c5af53b9ee18dc331db3.tar.gz
Skip tests involving ctypes on Windows
No idea about how to import libpq.
Diffstat (limited to 'tests/testutils.py')
-rw-r--r--tests/testutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testutils.py b/tests/testutils.py
index 5f41789..227c044 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -185,6 +185,9 @@ class ConnectingTestCase(unittest.TestCase):
return ConnectingTestCase._libpq
libname = find_library('pq')
+ if libname is None and platform.system() == 'Windows':
+ raise self.skipTest("can't import libpq on windows")
+
rv = ConnectingTestCase._libpq = ctypes.pydll.LoadLibrary(libname)
return rv