MCPcopy Index your code
hub / github.com/python/cpython / test_unix_getnode_from_libuuid

Method test_unix_getnode_from_libuuid

Lib/test/test_uuid.py:1268–1276  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1266
1267 @unittest.skipUnless(os.name == 'posix', 'POSIX only')
1268 def test_unix_getnode_from_libuuid(self):
1269 self.check_has_stable_libuuid_extractable_node()
1270 script = 'import uuid; print(uuid._unix_getnode())'
1271 _, n_a, _ = assert_python_ok('-c', script)
1272 _, n_b, _ = assert_python_ok('-c', script)
1273 n_a, n_b = n_a.decode().strip(), n_b.decode().strip()
1274 self.assertTrue(n_a.isdigit())
1275 self.assertTrue(n_b.isdigit())
1276 self.assertEqual(n_a, n_b)
1277
1278 @unittest.skipUnless(os.name == 'nt', 'Windows only')
1279 def test_windows_getnode_from_libuuid(self):

Callers

nothing calls this directly

Calls 7

assert_python_okFunction · 0.90
assertTrueMethod · 0.80
isdigitMethod · 0.80
stripMethod · 0.45
decodeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected