--- you can reply above this line ---

New issue 185: Monkeypatching time causes pytest to break
https://bitbucket.org/hpk42/pytest/issue/185/monkeypatching-time-causes-pytest-to-break

Alex Gaynor:

The new timing mechanism in pytest requires `time.time()` to work, if you use 
the `monkeypatch` funcarg, `time.time()` is called before it is torn down, 
causing things to explode. The following test is enough to break thigns:

{{{
#!python

import time


def test_m(monkeypatch):
    def f():
        raise Exception
    monkeypatch.setattr(time, "time", f)
}}}


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to