Nir Soffer has posted comments on this change. Change subject: tests: v2v: add test for commit f8127d8 ......................................................................
Patch Set 6: (1 comment) https://gerrit.ovirt.org/#/c/47367/6/tests/v2vTests.py File tests/v2vTests.py: Line 186: raise fake.Error(libvirt.VIR_ERR_INTERNAL_ERROR) Line 187: Line 188: # Cause vm 1 to fail, so it would not appear in results Line 189: vms[1].XMLDesc = internal_error Line 190: del specs[1] Can we do this on the top were you define specs? We have here 2 levels of nested functions - do we need it? If this works, I think it is more clear: specs = list(...) vms = [...] def internal_error(): raise ... # Cause vm 1 to fail, so it would not appear in results manipulate vms and specs... def connect(...): return LibvirtMock(vms=vms) What do you think? Line 191: return LibvirtMock(vms=vms) Line 192: Line 193: with MonkeyPatchScope([(libvirtconnection, 'open_connection', Line 194: _connect)]): -- To view, visit https://gerrit.ovirt.org/47367 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I38bd3c06df263bc208e1a8c8aa6c0081ebdc218d Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
