def METHOD_NAME():
    """
    When timeout == sleep_time, one iteration should happen.
    """
    timeout = 1
    sleep_time = 1
    func = lambda: 1  # noqa: E731
    results = []
    with pytest.raises(TimeoutExpiredError):
        for result in TimeoutSampler(timeout, sleep_time, func):
            results.append(result)
    assert results == [1]