Nir Soffer has posted comments on this change.

Change subject: test: Use mock module for testing
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/55342/1/lib/vdsm/compat.py
File lib/vdsm/compat.py:

Line 50:     from unittest import mock
Line 51:     mock
Line 52: except ImportError:  # py2
Line 53:     import mock
Line 54:     mock
> I wonder if worth to put this import under testlib or monkeypatch.py - alth
The mock module is the standard way for mocking, but for monkey patching we 
have our monkey patching module, and there is pytest monkeypatch which is the 
nicest way I know.

I would use mock only for mocking simple stuff. For more complex mocking it is 
better to write fake objects.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c0af7baab7c35a2617bd60a62a0b1534e5f8894
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Edward Haas <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Ondřej Svoboda <[email protected]>
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[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

Reply via email to