Re: [pytest-dev] [RFC] some initial ideas for pylib-2.0

2015-02-25 Thread Antonio Cuni
Hi, On Sat, Feb 21, 2015 at 8:01 PM, holger krekel wrote: > As far as pytest and tox are concerned i suggest (if anything) to reduce > usage and dependency on pylib to the point where it can be removed as a > dependency. This way there is no breaking combination of py/pytest > ever. One area

Re: [pytest-dev] monkeypatch / mock / higher level helpers

2013-09-17 Thread Antonio Cuni
On 17/09/13 12:13, holger krekel wrote: Not sure it would even be that useful TBH and would indeed be trickier to implement, i guess. Maybe it's better to rather think about higher level helpers than argue much about the setattr() convenience. I think that designing a good API is not only abou

Re: [pytest-dev] monkeypatch.setattr versus replace

2013-09-17 Thread Antonio Cuni
Hi, On 13/09/13 12:33, holger krekel wrote: monkeypatch.setattr("os.path.abspath", lambda x: "/abc") speaking about possible APIs, what about the following? monkeypatch("os.path.abspath = foo") I find it much more readable than the two or three argument versions, and it's in a way simi