mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
test: fix a pylint
After commit 7594cef35f
,
pylint show a "access to a protected member" warning.
This patch introduces a static method to solve it.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
parent
e0215dec61
commit
35c9afad45
@ -222,7 +222,7 @@ class TestCapabilities(unittest.TestCase):
|
|||||||
test_utils(new_caps_no_kvm, False, True, False, False, False)
|
test_utils(new_caps_no_kvm, False, True, False, False, False)
|
||||||
|
|
||||||
def testCPUMap(self):
|
def testCPUMap(self):
|
||||||
_CPUMapFileValues._cpu_filename = "tests/capabilities-xml/cpu_map.xml"
|
_CPUMapFileValues.update_cpu_filename("tests/capabilities-xml/cpu_map.xml")
|
||||||
caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml")
|
caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml")
|
||||||
cpu_64 = caps.get_cpu_values(None, "x86_64")
|
cpu_64 = caps.get_cpu_values(None, "x86_64")
|
||||||
cpu_32 = caps.get_cpu_values(None, "i486")
|
cpu_32 = caps.get_cpu_values(None, "i486")
|
||||||
|
@ -113,6 +113,10 @@ class _CPUMapFileValues(_CPUAPIValues):
|
|||||||
self._parseXML,
|
self._parseXML,
|
||||||
RuntimeError)
|
RuntimeError)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def update_cpu_filename(name):
|
||||||
|
_CPUMapFileValues._cpu_filename = name
|
||||||
|
|
||||||
def _parseXML(self, node):
|
def _parseXML(self, node):
|
||||||
child = node.children
|
child = node.children
|
||||||
while child:
|
while child:
|
||||||
|
Loading…
Reference in New Issue
Block a user