Skip to content

Commit 0b84325

Browse files
authored
correct check for _uuid_generate_time (#388)
If ctypes is not available, _uuid_generate_time will be None not its restype attribute.
1 parent 1e68716 commit 0b84325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_uuid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def test_uuid1(self):
340340
equal(((u.clock_seq_hi_variant & 0x3f) << 8) |
341341
u.clock_seq_low, 0x3fff)
342342

343-
@unittest.skipUnless(uuid._uuid_generate_time.restype is not None,
343+
@unittest.skipUnless(uuid._uuid_generate_time is not None,
344344
'requires uuid_generate_time_safe(3)')
345345
@unittest.skipUnless(importable('ctypes'), 'requires ctypes')
346346
def test_uuid1_safe(self):

0 commit comments

Comments
 (0)