lundi 19 septembre 2016

pytest monkeypatch: it is possible to return different values each time when patched method called?

In unittest I can assert to side_effect iterable with values - each of them one-by-one will be returned when patched method called, moreover I found that in unittest my patched method can return different results according to input arguments. Can I make something like that in pytest? Documentation does not mention this.

Aucun commentaire:

Enregistrer un commentaire