bpo-40501: Replace ctypes code in uuid with native module (GH-19948)
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index ac166ce..b1c9242 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -852,17 +852,6 @@
node = self.uuid._netstat_getnode()
self.check_node(node, 'netstat')
- @unittest.skipUnless(os.name == 'nt', 'requires Windows')
- def test_ipconfig_getnode(self):
- node = self.uuid._ipconfig_getnode()
- self.check_node(node, 'ipconfig')
-
- @unittest.skipUnless(importable('win32wnet'), 'requires win32wnet')
- @unittest.skipUnless(importable('netbios'), 'requires netbios')
- def test_netbios_getnode(self):
- node = self.uuid._netbios_getnode()
- self.check_node(node)
-
def test_random_getnode(self):
node = self.uuid._random_getnode()
# The multicast bit, i.e. the least significant bit of first octet,
@@ -874,6 +863,13 @@
node2 = self.uuid._random_getnode()
self.assertNotEqual(node2, node, '%012x' % node)
+class TestInternalsWithoutExtModule(BaseTestInternals, unittest.TestCase):
+ uuid = py_uuid
+
+@unittest.skipUnless(c_uuid, 'requires the C _uuid module')
+class TestInternalsWithExtModule(BaseTestInternals, unittest.TestCase):
+ uuid = c_uuid
+
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_unix_getnode(self):
if not importable('_uuid') and not importable('ctypes'):
@@ -885,19 +881,10 @@
self.check_node(node, 'unix')
@unittest.skipUnless(os.name == 'nt', 'requires Windows')
- @unittest.skipUnless(importable('ctypes'), 'requires ctypes')
def test_windll_getnode(self):
node = self.uuid._windll_getnode()
self.check_node(node)
-class TestInternalsWithoutExtModule(BaseTestInternals, unittest.TestCase):
- uuid = py_uuid
-
-@unittest.skipUnless(c_uuid, 'requires the C _uuid module')
-class TestInternalsWithExtModule(BaseTestInternals, unittest.TestCase):
- uuid = c_uuid
-
-
if __name__ == '__main__':
unittest.main()