Exemplo n.º 1
0
def test_progress_ok(checker: ProgressChecker):
    for _ in range(235):
        checker.track([0.0, 0.0, 0.0])
        assert checker.is_progress()

    checker.track([0.5, 0.0, 0.0])
    assert checker.is_progress()
Exemplo n.º 2
0
def test_no_progress(checker: ProgressChecker):
    x = 0.0
    checker.track([x, 0.0, 0.0])
    for _ in range(234):
        x += 0.002
        checker.track([x, 0.0, 0.0])
        assert checker.is_progress()

    checker.track([x + 0.002, 0.0, 0.0])
    assert not checker.is_progress()
Exemplo n.º 3
0
def test_progress_enough_steps(checker: ProgressChecker):
    checker.iterator = 235

    assert not checker.is_progress()
Exemplo n.º 4
0
def test_progress_after_initialize(checker: ProgressChecker):
    assert checker.is_progress()