Skip to content
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

BUG new unit test failed #855

Closed
prjemian opened this issue May 17, 2023 · 2 comments · Fixed by #856
Closed

BUG new unit test failed #855

prjemian opened this issue May 17, 2023 · 2 comments · Fixed by #856
Assignees
Labels
Milestone

Comments

@prjemian
Copy link
Contributor

While the Py3.10 CI passed, the Py3.8 CI failed at this point:

    def test_sim_heater(method, scan, Kp, Ki):
        epid = Fb_EpidDatabaseHeaterSimulator(f"{IOC}epid1", name="epid")
        epid.wait_for_connection()
    
        getattr(epid, method)()
        assert epid.scanning_rate.get() == scan
        assert epid.proportional_gain.get() == Kp
>       assert epid.integral_gain.get() == Ki
E       AssertionError: assert 0.0 == 0.5

Other similar failures were encountered in development (and the test asserts removed).

@prjemian prjemian added the bug label May 17, 2023
@prjemian prjemian added this to the 1.6.16 milestone May 17, 2023
@prjemian prjemian self-assigned this May 17, 2023
@prjemian
Copy link
Contributor Author

Perhaps testing too soon after the EPICS puts? Add a delay?

@prjemian
Copy link
Contributor Author

Next time, failed Py3.11 at different code:

_______________________________ test_sseq_reset ________________________________

    def test_sseq_reset():
        user = UserStringSequenceDevice(IOC, name="user")
        user.wait_for_connection()
        user.enable.put("Enable")
        assert len(user.read()) == 200
    
        sseq = user.sseq10
        assert isinstance(sseq, SseqRecord)
        sseq.enable.put("E")  # Note: only "E"
    
        step = sseq.steps.step1
        assert isinstance(step, sseqRecordStep)
    
        step.reset()
        timed_pause()
    
        assert step.input_pv.get() == ""
    
        uptime = EpicsSignal(f"{IOC}UPTIME", name="uptime")
        uptime.wait_for_connection()
    
        step.input_pv.put(uptime.pvname)
        assert step.string_value.get() == f"{0:.5f}"
        sseq.process_record.put(1)
        assert step.string_value.get() <= uptime.get()
    
        user.reset()
        timed_pause()
>       assert step.input_pv.get() == ""
E       AssertionError: assert 'gp:UPTIME NPP NMS' == ''
E         + gp:UPTIME NPP NMS

Re-run the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant