Roman Bogorodskiy <bogorodskiy@xxxxxxxxx> writes: > testCPUMap() tries to open /usr/share/libvirt/cpu_map.xml file > and that fails if libvirt is not installed on the system > or cpu_map.xml path is different. > > Force it to use tests/capabilities-xml/cpu_map.xml file instead. > --- > tests/capabilities.py | 2 ++ > virtinst/capabilities.py | 5 +++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/tests/capabilities.py b/tests/capabilities.py > index db69c6f..8c18993 100644 > --- a/tests/capabilities.py > +++ b/tests/capabilities.py > @@ -20,6 +20,7 @@ import unittest > > from tests import utils > from virtinst import CapabilitiesParser as capabilities > +from virtinst.capabilities import _CPUMapFileValues > > > def build_host_feature_dict(feature_list): > @@ -221,6 +222,7 @@ class TestCapabilities(unittest.TestCase): > test_utils(new_caps_no_kvm, False, True, False, False, False) > > def testCPUMap(self): > + _CPUMapFileValues._cpu_filename = "tests/capabilities-xml/cpu_map.xml" > caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml") commit 81696a514441f2320ea10299e1852795f8cb1682 removed the cpu_filename optional argument from the CPUValues constructor. Maybe we should revert partly that commit and pass cpu_filename trough __init__ again? Thanks, Giuseppe _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list