diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2021-10-29 13:18:14 +0100 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-01-20 14:16:38 -0500 |
commit | 552759bef49a27d49e6d981d51600cd7da34062e (patch) | |
tree | 64626bf1ce317f5b2fb08ae5d86b4cc910ead4c1 | |
parent | 609007c9ca4632dc2e51678db7c8a525dde850f1 (diff) | |
download | virt-manager-552759bef49a27d49e6d981d51600cd7da34062e.tar.gz |
tests: re-arrange CPU topology test for clarity
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r-- | tests/test_misc.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py index 933df6b9..01f650c3 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -22,14 +22,17 @@ def test_misc_cpu_topology(): Various topology calculation corner cases """ conn = utils.URIs.open_testdefault_cached() + + def get_top(_c): + return [_c.topology.sockets, _c.topology.dies, _c.topology.cores, _c.topology.threads] + cpu = virtinst.DomainCpu(conn) cpu.set_topology_defaults(6) assert cpu.topology.sockets is None + cpu = virtinst.DomainCpu(conn) cpu.topology.sockets = "2" cpu.set_topology_defaults(6) - def get_top(_c): - return [_c.topology.sockets, _c.topology.dies, _c.topology.cores, _c.topology.threads] assert get_top(cpu) == [2, 1, 3, 1] cpu = virtinst.DomainCpu(conn) |