New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certain tests still fail randomly in CI #748
Comments
Since the CI workflow takes so long to complete (cycle times can be >10m), consider diagnosing this in a separate Repo. |
CI is passing now, skipping all tests marked |
Failed again, locally:
|
Replace failing assert per stackoverflow. (Function to determine if two numbers are nearly equal when rounded to n significant decimal digits) |
We've got a tolerance, not the number of sig figs. Thus, use |
TST #748 refactor the assertion of almost equal
Again! Different place. assert round(pos.readback.get(use_monitor=False), 2) == known_start_position
> assert pos.inposition, f"target={pos.setpoint.get()}, readback={pos.position}"
E AssertionError: target=-1.0, readback=-1.0
E assert False
E + where False = PVPositionerSoftDoneWithStop(prefix='gp:gp:', name='pos', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=['done', 'tolerance', 'target'], limits=None, egu='').inposition
/home/runner/work/apstools/apstools/apstools/devices/tests/test_positioner_soft_done.py:321: AssertionError |
Another: > assert math.isclose(rb, sp, abs_tol=positioner.actual_tolerance)
E AssertionError: assert False
E + where False = <built-in function isclose>(0.0, -1.0, abs_tol=1e-05)
E + where <built-in function isclose> = math.isclose
E + and 1e-05 = PVPositionerSoftDoneWithStop(prefix='', name='calcpos', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=['done', 'tolerance', 'target'], limits=None, egu='').actual_tolerance
/home/runner/work/apstools/apstools/apstools/devices/tests/test_positioner_soft_done.py:275: AssertionError |
The setpoint is new but the readback suggests the positioner has not moved. Perhaps the problem lies in the implementation code, not the test code? |
…ftDone test that positioner is in position #748
Replace the three tests. For now, restore the |
Until it is understood why certain tests fail have random failures in CI, mark them with
@pytest.mark.local
.Originally posted by @prjemian in #747 (comment)
The text was updated successfully, but these errors were encountered: