def test_waitonchange(self, tmpdir, monkeypatch): tmp = tmpdir sd = StatRecorder([tmp]) l = [True, False] monkeypatch.setattr(StatRecorder, 'check', lambda self: l.pop()) sd.waitonchange(checkinterval=0.2) assert not l
def test_waitonchange(self, tmpdir, monkeypatch): tmp = tmpdir sd = StatRecorder([tmp]) l = [True, False] monkeypatch.setattr(StatRecorder, 'check', lambda self: l.pop()) sd.waitonchange(checkinterval=0.2) assert not l
def test_waitonchange(self, tmpdir, monkeypatch): tmp = tmpdir sd = StatRecorder([tmp]) ret_values = [True, False] monkeypatch.setattr(StatRecorder, "check", lambda self: ret_values.pop()) sd.waitonchange(checkinterval=0.2) assert not ret_values
def test_waitonchange(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: tmp = tmp_path sd = StatRecorder([py.path.local(tmp)]) ret_values = [True, False] monkeypatch.setattr(StatRecorder, "check", lambda self: ret_values.pop()) sd.waitonchange(checkinterval=0.2) assert not ret_values