def test_weird_drawtime_issues(drawtime, runtime): # Regression test for #1346, where we don't have the expected relationship # 0<=drawtime<= runtime due to changing clocks or floating-point issues. engine = ConjectureRunner(lambda: None) engine.exit_reason = ExitReason.finished engine.status_runtimes[Status.VALID] = [0] engine.all_drawtimes.append(drawtime) engine.all_runtimes.extend([0, runtime]) stats = Statistics(engine) assert stats.draw_time_percentage == "NaN"
def test_weird_drawtime_issues(drawtime, runtime): # Regression test for #1346, where we don't have the expected relationship # 0<=drawtime<= runtime due to changing clocks or floating-point issues. engine = ConjectureRunner(lambda: None) engine.exit_reason = ExitReason.finished engine.status_runtimes[Status.VALID] = [0] engine.all_drawtimes.append(drawtime) engine.all_runtimes.extend([0, runtime]) stats = Statistics(engine) assert stats.draw_time_percentage == 'NaN'