diff --git a/tests/types_extras.py b/tests/types_extras.py index f733950b..61d2857e 100644 --- a/tests/types_extras.py +++ b/tests/types_extras.py @@ -29,6 +29,11 @@ import tests def skip_if_no_uuid(f): def skip_if_no_uuid_(self): + try: + import uuid + except ImportError: + return self.skipTest("uuid not available in this Python version") + try: cur = self.conn.cursor() cur.execute("select typname from pg_type where typname = 'uuid'") @@ -39,7 +44,7 @@ def skip_if_no_uuid(f): if has: return f(self) else: - return self.skipTest("uuid type not available") + return self.skipTest("uuid type not available on the server") return skip_if_no_uuid_