Lines Matching refs:uuid
32 uuid = None variable in BaseTestUUID
47 0, 0, self.uuid.RESERVED_NCS, None),
56 0x607040500010203, 0x809, self.uuid.RESERVED_NCS, None),
65 0x82e946702d9e6d5, 0xf9b, self.uuid.RFC_4122, 3),
74 0x678123412345678, 0x1234, self.uuid.RESERVED_NCS, None),
83 0x1d19dad6ba7b810, 0xb4, self.uuid.RFC_4122, 1),
92 0x1d19dad6ba7b811, 0xb4, self.uuid.RFC_4122, 1),
101 0x1d19dad6ba7b812, 0xb4, self.uuid.RFC_4122, 1),
110 0x1d19dad6ba7b814, 0xb4, self.uuid.RFC_4122, 1),
119 0x1d19dc07d444840, 0x3245, self.uuid.RFC_4122, 1),
128 0xc7e9d22e902893a, 0x27b8, self.uuid.RFC_4122, 3),
137 0xef86f54eb424026, 0x24d0, self.uuid.RFC_4122, 4),
146 0x1d07decf81d4fae, 0x2765, self.uuid.RFC_4122, 1),
155 0xffefffefffefdfc, 0x3ffe, self.uuid.RESERVED_FUTURE, None),
164 0xfffffffffffffff, 0x3fff, self.uuid.RESERVED_FUTURE, None),
168 for u in [self.uuid.UUID(string), self.uuid.UUID(curly), self.uuid.UUID(hex),
169 self.uuid.UUID(bytes=bytes), self.uuid.UUID(bytes_le=bytes_le),
170 self.uuid.UUID(fields=fields), self.uuid.UUID(int=integer),
171 self.uuid.UUID(urn)]:
225 badvalue(lambda: self.uuid.UUID(''))
226 badvalue(lambda: self.uuid.UUID('abc'))
227 badvalue(lambda: self.uuid.UUID('1234567812345678123456781234567'))
228 badvalue(lambda: self.uuid.UUID('123456781234567812345678123456789'))
229 badvalue(lambda: self.uuid.UUID('123456781234567812345678z2345678'))
232 badvalue(lambda: self.uuid.UUID(bytes='abc'))
233 badvalue(lambda: self.uuid.UUID(bytes='\0'*15))
234 badvalue(lambda: self.uuid.UUID(bytes='\0'*17))
237 badvalue(lambda: self.uuid.UUID(bytes_le='abc'))
238 badvalue(lambda: self.uuid.UUID(bytes_le='\0'*15))
239 badvalue(lambda: self.uuid.UUID(bytes_le='\0'*17))
242 badvalue(lambda: self.uuid.UUID(fields=(1,)))
243 badvalue(lambda: self.uuid.UUID(fields=(1, 2, 3, 4, 5)))
244 badvalue(lambda: self.uuid.UUID(fields=(1, 2, 3, 4, 5, 6, 7)))
247 badvalue(lambda: self.uuid.UUID(fields=(-1, 0, 0, 0, 0, 0)))
248 badvalue(lambda: self.uuid.UUID(fields=(0x100000000, 0, 0, 0, 0, 0)))
249 badvalue(lambda: self.uuid.UUID(fields=(0, -1, 0, 0, 0, 0)))
250 badvalue(lambda: self.uuid.UUID(fields=(0, 0x10000, 0, 0, 0, 0)))
251 badvalue(lambda: self.uuid.UUID(fields=(0, 0, -1, 0, 0, 0)))
252 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0x10000, 0, 0, 0)))
253 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, -1, 0, 0)))
254 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, 0x100, 0, 0)))
255 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, 0, -1, 0)))
256 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, 0, 0x100, 0)))
257 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, 0, 0, -1)))
258 badvalue(lambda: self.uuid.UUID(fields=(0, 0, 0, 0, 0, 0x1000000000000)))
261 badvalue(lambda: self.uuid.UUID('00'*16, version=0))
262 badvalue(lambda: self.uuid.UUID('00'*16, version=6))
265 badvalue(lambda: self.uuid.UUID(int=-1))
266 badvalue(lambda: self.uuid.UUID(int=1<<128))
270 self.uuid.UUID(h)
271 self.uuid.UUID(hex=h)
272 self.uuid.UUID(bytes=b)
273 self.uuid.UUID(bytes_le=b)
274 self.uuid.UUID(fields=f)
275 self.uuid.UUID(int=i)
278 badtype(lambda: self.uuid.UUID())
279 badtype(lambda: self.uuid.UUID(h, b))
280 badtype(lambda: self.uuid.UUID(h, b, b))
281 badtype(lambda: self.uuid.UUID(h, b, b, f))
282 badtype(lambda: self.uuid.UUID(h, b, b, f, i))
292 badtype(lambda: self.uuid.UUID(h, **args))
294 badtype(lambda: self.uuid.UUID(**args))
297 u = self.uuid.UUID(h)
316 node1 = self.uuid.getnode()
320 node2 = self.uuid.getnode()
328 with support.swap_item(sys.modules, 'uuid', self.uuid):
329 for is_safe in self.uuid.SafeUUID:
330 u = self.uuid.UUID('d82579ce6642a0de7ddf490a7aec7aa5',
440 u = self.uuid.UUID('d82579ce6642a0de7ddf490a7aec7aa5')
441 u_safe = self.uuid.UUID('d82579ce6642a0de7ddf490a7aec7aa5',
442 is_safe=self.uuid.SafeUUID.safe)
443 u_unsafe = self.uuid.UUID('d82579ce6642a0de7ddf490a7aec7aa5',
444 is_safe=self.uuid.SafeUUID.unsafe)
446 with support.swap_item(sys.modules, 'uuid', self.uuid):
467 self.uuid,
471 node = self.uuid.getnode()
478 self.uuid.uuid1(node=node)
486 for u in [self.uuid.uuid1() for i in range(10)]:
487 equal(u.variant, self.uuid.RFC_4122)
489 self.assertIn(u.is_safe, {self.uuid.SafeUUID.safe,
490 self.uuid.SafeUUID.unsafe,
491 self.uuid.SafeUUID.unknown})
495 for u in [self.uuid.uuid1() for i in range(1000)]:
500 u = self.uuid.uuid1(0)
502 u = self.uuid.uuid1(0x123456789abc)
504 u = self.uuid.uuid1(0xffffffffffff)
508 u = self.uuid.uuid1(0x123456789abc, 0)
511 u = self.uuid.uuid1(0x123456789abc, 0x1234)
515 u = self.uuid.uuid1(0x123456789abc, 0x3fff)
525 if not self.uuid._has_uuid_generate_time_safe:
528 u = self.uuid.uuid1()
532 self.assertNotEqual(u.is_safe, self.uuid.SafeUUID.unknown)
541 self.uuid._load_system_functions()
542 f = self.uuid._generate_time_safe
545 with mock.patch.object(self.uuid, '_generate_time_safe',
554 u = self.uuid.uuid1()
555 self.assertEqual(u.is_safe, self.uuid.SafeUUID.unknown)
560 u = self.uuid.uuid1()
561 self.assertEqual(u.is_safe, self.uuid.SafeUUID.safe)
566 u = self.uuid.uuid1()
567 self.assertEqual(u.is_safe, self.uuid.SafeUUID.unsafe)
572 u = self.uuid.uuid1()
573 self.assertEqual(u.is_safe, self.uuid.SafeUUID.unknown)
576 with mock.patch.object(self.uuid, '_has_uuid_generate_time_safe', False), \
577 mock.patch.object(self.uuid, '_generate_time_safe', None), \
578 mock.patch.object(self.uuid, '_last_timestamp', None), \
579 mock.patch.object(self.uuid, 'getnode', return_value=93328246233727), \
582 u = self.uuid.uuid1()
583 self.assertEqual(u, self.uuid.UUID('a7a55b92-01fc-11e9-94c5-54e1acf6da7f'))
585 with mock.patch.object(self.uuid, '_has_uuid_generate_time_safe', False), \
586 mock.patch.object(self.uuid, '_generate_time_safe', None), \
587 mock.patch.object(self.uuid, '_last_timestamp', None), \
589 u = self.uuid.uuid1(node=93328246233727, clock_seq=5317)
590 self.assertEqual(u, self.uuid.UUID('a7a55b92-01fc-11e9-94c5-54e1acf6da7f'))
596 for u, v in [(self.uuid.uuid3(self.uuid.NAMESPACE_DNS, 'python.org'),
598 (self.uuid.uuid3(self.uuid.NAMESPACE_URL, 'http://python.org/'),
600 (self.uuid.uuid3(self.uuid.NAMESPACE_OID, '1.3.6.1'),
602 (self.uuid.uuid3(self.uuid.NAMESPACE_X500, 'c=ca'),
605 equal(u.variant, self.uuid.RFC_4122)
607 equal(u, self.uuid.UUID(v))
614 for u in [self.uuid.uuid4() for i in range(10)]:
615 equal(u.variant, self.uuid.RFC_4122)
620 for u in [self.uuid.uuid4() for i in range(1000)]:
628 for u, v in [(self.uuid.uuid5(self.uuid.NAMESPACE_DNS, 'python.org'),
630 (self.uuid.uuid5(self.uuid.NAMESPACE_URL, 'http://python.org/'),
632 (self.uuid.uuid5(self.uuid.NAMESPACE_OID, '1.3.6.1'),
634 (self.uuid.uuid5(self.uuid.NAMESPACE_X500, 'c=ca'),
637 equal(u.variant, self.uuid.RFC_4122)
639 equal(u, self.uuid.UUID(v))
651 value = self.uuid.uuid4()
658 parent_value = self.uuid.uuid4().hex
666 strong = self.uuid.uuid4()
671 uuid = py_uuid variable in TestUUIDWithoutExtModule
675 uuid = c_uuid variable in TestUUIDWithExtModule
683 patch = mock.patch.multiple(self.uuid,
687 patch = mock.patch.multiple(self.uuid,
704 self.assertEqual(self.uuid._parse_mac(mac), expected)
725 self.assertIsNone(self.uuid._parse_mac(mac))
746 with mock.patch.multiple(self.uuid,
750 mac = self.uuid._find_mac_under_heading(
783 with mock.patch.multiple(self.uuid,
787 mac = self.uuid._find_mac_under_heading(
804 with mock.patch.multiple(self.uuid,
808 mac = self.uuid._find_mac_near_keyword(
829 node = self.uuid._ifconfig_getnode()
835 node = self.uuid._ip_getnode()
841 node = self.uuid._arp_getnode()
847 node = self.uuid._lanscan_getnode()
853 node = self.uuid._netstat_getnode()
857 node = self.uuid._random_getnode()
864 node2 = self.uuid._random_getnode()
868 uuid = py_uuid variable in TestInternalsWithoutExtModule
872 uuid = c_uuid variable in TestInternalsWithExtModule
879 node = self.uuid._unix_getnode()
886 node = self.uuid._windll_getnode()