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 <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to