Alon Bar-Lev has posted comments on this change.
Change subject: configNetworkTests: use context to manage monkey patches ......................................................................
Patch Set 5: (2 inline comments)
.................................................... File tests/monkeypatch.py Line 34: # logic Line 35: # --- Line 36: # Line 37: def MonkeyPatch(module, name, that): Line 38: def decorator(f): Done Line 39: def test(*args, **kw): Line 40: old = getattr(module, name) Line 41: setattr(module, name, that) Line 42: f(*args, **kw)
Line 38: def decorator(f): Line 39: def test(*args, **kw): Line 40: old = getattr(module, name) Line 41: setattr(module, name, that) Line 42: f(*args, **kw) I thought to minimize overhead...
Done Line 43: setattr(module, name, old) Line 44: return test Line 45: return decorator Line 46:
-- To view, visit http://gerrit.ovirt.org/6939 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I2ecb4589f2edbf605e62a8963889d314c2535537 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server