Change in vdsm[master]: tests: Add @recorded method decorator

fromani at redhat.com fromani at redhat.com
Thu Jul 2 10:39:27 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: tests: Add @recorded method decorator
......................................................................


Patch Set 5: Code-Review+1

(1 comment)

changing score after Nir's replies.

https://gerrit.ovirt.org/#/c/43015/5/tests/testlib.py
File tests/testlib.py:

Line 388:     Method decorator recording calls to instance's __recording__ list.
Line 389:     """
Line 390:     @wraps(meth)
Line 391:     def wrapper(self, *args, **kwargs):
Line 392:         recording = self.__dict__.setdefault("__recording__", [])
> We are already using __secured__ and __is_secured__ (see storage/secutable.
OK to both (not really convinced about __names__, but good enough explanation, so no good reason for me to object)
Line 393:         recording.append((meth.func_name, args, kwargs))
Line 394:         return meth(self, *args, **kwargs)


-- 
To view, visit https://gerrit.ovirt.org/43015
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I43c7750ae1deb5fa9bbee40d9f6f624ce1105c4e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list