diff options
Diffstat (limited to 'Lib/test/test_uuid.py')
-rw-r--r-- | Lib/test/test_uuid.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index 5ccdcb1..92d6294 100644 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -364,6 +364,12 @@ class TestUUID(TestCase): self.assertEqual(node1, node2) def test_uuid1(self): + # uuid1 requires ctypes. + try: + import ctypes + except ImportError: + return + equal = self.assertEqual # Make sure uuid1() generates UUIDs that are actually version 1. @@ -417,6 +423,12 @@ class TestUUID(TestCase): equal(str(u), v) def test_uuid4(self): + # uuid4 requires ctypes. + try: + import ctypes + except ImportError: + return + equal = self.assertEqual # Make sure uuid4() generates UUIDs that are actually version 4. |