From 3b7c083c3d92b7c1cd22c5af53b9ee18dc331db3 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 16 Feb 2019 18:07:28 +0100 Subject: [PATCH] Skip tests involving ctypes on Windows No idea about how to import libpq. --- tests/testutils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testutils.py b/tests/testutils.py index 5f417893..227c0448 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