Skip to content

Commit

Permalink
Adding test cases for input/output record write access
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushik Malapati authored and Kaushik Malapati committed Jul 23, 2024
1 parent 9c626b0 commit 36beb25
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pytmc/tests/test_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,31 @@ def test_epics_record_with_linter(dbd_file):
assert not (linted.errors)


def test_input_record_without_write_access():
kwargs = {
"pvname": "Tst:pv",
"record_type": "ai",
"direction": "input",
}

ec = EPICSRecord(**kwargs)
record = ec.render()
assert "ASG" in record
assert "NO_WRITE" in record


def test_output_record_with_write_access():
kwargs = {
"pvname": "Tst:pv",
"record_type": "ao",
"direction": "output",
}

ec = EPICSRecord(**kwargs)
record = ec.render()
assert "ASG" not in record


def test_sort_fields():
unsorted_entry = OrderedDict(
[
Expand Down

0 comments on commit 36beb25

Please sign in to comment.