Skip to content

Commit

Permalink
adjusted unit tests to fit the new naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Aug 14, 2023
1 parent 8ab9986 commit 8efd743
Show file tree
Hide file tree
Showing 14 changed files with 630 additions and 610 deletions.
20 changes: 10 additions & 10 deletions tests/fixtures/mocked_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@ def standard_responses(table_field_info, table_data_1, table_data_2):
),
}
),
command_to_key(Put(field="PCAP1.TRIG_EDGE", value="Falling")): repeat("OK"),
command_to_key(Put(field="PCAP.TRIG_EDGE", value="Falling")): repeat("OK"),
command_to_key(Arm()): repeat("OK"),
command_to_key(Disarm()): repeat("OK"),
command_to_key(
Put(
field="SEQ1.TABLE",
field="SEQ.TABLE",
value=[
"2457862145",
"4294967291",
Expand All @@ -438,7 +438,7 @@ def standard_responses(table_field_info, table_data_1, table_data_2):
): repeat(None),
command_to_key(
Put(
field="SEQ1.TABLE",
field="SEQ.TABLE",
value=[
"2457862145",
"4294967291",
Expand Down Expand Up @@ -467,7 +467,7 @@ def standard_responses(table_field_info, table_data_1, table_data_2):
},
),
# DRVL changing from 8e-06 ms to minutes
command_to_key(GetLine(field="PULSE1.DELAY.MIN")): chain(
command_to_key(GetLine(field="PULSE.DELAY.MIN")): chain(
["8e-09"], repeat("1.333333333e-10")
),
command_to_key(GetFieldInfo(block="SEQ", extended_metadata=True)): repeat(
Expand All @@ -490,22 +490,22 @@ def standard_responses(table_field_info, table_data_1, table_data_2):
"PCAP.GATE": "CLOCK1.OUT",
"PCAP.GATE.DELAY": "1",
"PCAP.ARM": "0",
"*METADATA.LABEL_PCAP1": "PcapMetadataLabel",
"*METADATA.LABEL_PCAP": "PcapMetadataLabel",
"PULSE.DELAY": "100",
"PULSE1.DELAY.UNITS": "ms",
"PULSE1.DELAY.MIN": "8e-06",
"PULSE.DELAY.UNITS": "ms",
"PULSE.DELAY.MIN": "8e-06",
},
multiline_values={"SEQ1.TABLE": table_data_1},
multiline_values={"SEQ.TABLE": table_data_1},
),
# 0.5 seconds of no changes in case the ioc setup completes
# before the test starts
respond_with_no_changes(number_of_iterations=10),
changes_iterator_wrapper(
values={
"PCAP.TRIG_EDGE": "Either",
"PULSE1.DELAY.UNITS": "s",
"PULSE.DELAY.UNITS": "s",
},
multiline_values={"SEQ1.TABLE": table_data_2},
multiline_values={"SEQ.TABLE": table_data_2},
),
# Keep the panda active with no changes until pytest tears it down
respond_with_no_changes(),
Expand Down
115 changes: 115 additions & 0 deletions tests/test-bobfiles/PCAP.bob
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<display version="2.0.0">
<name>Display</name>
<x>0</x>
<y>0</y>
<width>408</width>
<height>202</height>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
<widget type="label" version="2.0.0">
<name>Title</name>
<class>TITLE</class>
<text>PCAP - TEST-PREFIX:</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>408</width>
<height>25</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP: LABEL</text>
<x>23</x>
<y>30</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TextUpdate</name>
<pv_name>TEST-PREFIX:PCAP:LABEL</pv_name>
<x>278</x>
<y>30</y>
<width>125</width>
<height>20</height>
<font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</font>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>PARAMETERS</name>
<x>5</x>
<y>55</y>
<width>351</width>
<height>56</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP: TRIG_ EDGE</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="combo" version="2.0.0">
<name>ComboBox</name>
<pv_name>TEST-PREFIX:PCAP:TRIG_EDGE</pv_name>
<x>255</x>
<y>0</y>
<width>60</width>
<height>20</height>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>INPUTS</name>
<x>5</x>
<y>116</y>
<width>351</width>
<height>81</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP: GATE</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PCAP:GATE</pv_name>
<x>255</x>
<y>0</y>
<width>60</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP: GATE: DELAY</text>
<x>0</x>
<y>25</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PCAP:GATE:DELAY</pv_name>
<x>255</x>
<y>25</y>
<width>60</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
</widget>
</display>
111 changes: 0 additions & 111 deletions tests/test-bobfiles/PCAP1.bob

This file was deleted.

69 changes: 69 additions & 0 deletions tests/test-bobfiles/PULSE.bob
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<display version="2.0.0">
<name>Display</name>
<x>0</x>
<y>0</y>
<width>361</width>
<height>116</height>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
<widget type="label" version="2.0.0">
<name>Title</name>
<class>TITLE</class>
<text>PULSE - TEST-PREFIX:</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>361</width>
<height>25</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>PARAMETERS</name>
<x>5</x>
<y>30</y>
<width>351</width>
<height>81</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PULSE: DELAY</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PULSE:DELAY</pv_name>
<x>255</x>
<y>0</y>
<width>60</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PULSE: DELAY: UNITS</text>
<x>0</x>
<y>25</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="combo" version="2.0.0">
<name>ComboBox</name>
<pv_name>TEST-PREFIX:PULSE:DELAY:UNITS</pv_name>
<x>255</x>
<y>25</y>
<width>60</width>
<height>20</height>
</widget>
</widget>
</display>
Loading

0 comments on commit 8efd743

Please sign in to comment.