Skip to content

Commit

Permalink
TST: adding basic tpr test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushik Malapati authored and Kaushik Malapati committed Oct 25, 2023
1 parent cef09c1 commit 2e738c2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pcdsdevices/tests/test_tpr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pytest
from ophyd.sim import make_fake_device

from ..tpr import TprTrigger


@pytest.fixture(scope='function')
def fake_trigger():
cls = make_fake_device(TprTrigger)
return cls('TST:TPR', channel=1, name='trig_a')


def test_enable(fake_trigger):
fake_trigger.enable()
assert fake_trigger.enable_cmd.get() == 1
fake_trigger.disable()
assert fake_trigger.enable_cmd.get() == 0


@pytest.mark.timeout(5)
def test_disconnected_trigger():
TprTrigger('TST', channel=1, name='test')

0 comments on commit 2e738c2

Please sign in to comment.