[virt-tools-list] [virt-manager PATCH 3/8] tests: capabilities: remove testCPUAPI

Pavel Hrdina phrdina at redhat.com
Fri Mar 15 16:41:37 UTC 2019


This test case is pointless, get_cpu_values() calls only libvirt API
which will return list of CPUs known to libvirt and we check whether
that list is correct.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tests/capabilities.py | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/tests/capabilities.py b/tests/capabilities.py
index 11401d0b..16e5b933 100644
--- a/tests/capabilities.py
+++ b/tests/capabilities.py
@@ -55,38 +55,6 @@ class TestCapabilities(unittest.TestCase):
         self.assertEqual(cells[0].cpus[3].id, '3')
 
 
-    ####################################
-    # Test getCPUModel output handling #
-    ####################################
-
-    def testCPUAPI(self):
-        caps = self._buildCaps("test-qemu-with-kvm.xml")
-
-        cpu_64 = caps.get_cpu_values("x86_64")
-        cpu_32 = caps.get_cpu_values("i686")
-        cpu_random = caps.get_cpu_values("mips")
-
-        def test_cpu_map(cpumap, cpus):
-            cpunames = sorted(cpumap, key=str.lower)
-
-            for c in cpus:
-                self.assertTrue(c in cpunames)
-
-        self.assertEqual(cpu_64, cpu_32)
-
-        x86_cpunames = [
-            '486', 'athlon', 'Conroe', 'core2duo', 'coreduo', 'n270',
-            'Nehalem', 'Opteron_G1', 'Opteron_G2', 'Opteron_G3', 'Penryn',
-            'pentium', 'pentium2', 'pentium3', 'pentiumpro', 'phenom',
-            'qemu32', 'qemu64']
-
-        test_cpu_map(cpu_64, x86_cpunames)
-        test_cpu_map(cpu_random, [])
-
-        cpu_64 = caps.get_cpu_values("x86_64")
-        self.assertTrue(len(cpu_64) > 0)
-
-
     ##############################
     # domcapabilities.py testing #
     ##############################
-- 
2.20.1




More information about the virt-tools-list mailing list