STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_hookup Namespace Reference

Functions

Session _session (Hookup|None hookup)
None test_the_suggestion_is_what_the_session_always_did ()
None test_a_knob_sets_the_plain_regulator_it_is_linked_to ()
None test_a_pin_wins_an_empty_pin_unbinds_and_a_stale_pin_is_ignored ()
None test_a_regulator_cannot_be_on_two_knobs ()
None test_aliases_round_trip_and_blanks_are_dropped ()

Variables

 STAR = Path(__file__).resolve().parents[3]
str STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json"
str TABLES = STAR / "feed-twin" / "backend" / "statemachines"
 needs_stand

Detailed Description

A stand's hookup: which valve each actuator drives, which knob sets which regulator.

Three promises, each checked against something it cannot fake:

* **The suggestion is the old behaviour, exactly.** A session given ``suggest()``
  emits the same signals, bit for bit, as one given no hookup -- so an imported
  drawing behaves as it always did until somebody changes it.
* **A knob moves the regulator it is linked to.** A plain hand-loaded regulator
  linked to a knob holds the knob's setting, and the tank it presses locks up
  there; unlinked, it holds the drawn setpoint.
* **A pin wins over the name match**, an empty pin leaves an actuator unbound,
  and a pin naming a valve the drawing lost is ignored rather than leaving a
  main valve uncommanded.

Function Documentation

◆ _session()

Session test_hookup._session ( Hookup | None hookup)
protected

◆ test_a_knob_sets_the_plain_regulator_it_is_linked_to()

None test_hookup.test_a_knob_sets_the_plain_regulator_it_is_linked_to ( )
LE4's layout with a hand-loaded regulator (drawn at 560). Linked to a knob at
400 psig the tanks lock up near 400; unlinked they lock up near 560. The test
can fail: a knob that drove nothing leaves both at 560.

Definition at line 69 of file test_hookup.py.

◆ test_a_pin_wins_an_empty_pin_unbinds_and_a_stale_pin_is_ignored()

None test_hookup.test_a_pin_wins_an_empty_pin_unbinds_and_a_stale_pin_is_ignored ( )

Definition at line 97 of file test_hookup.py.

References _session(), and count().

◆ test_a_regulator_cannot_be_on_two_knobs()

None test_hookup.test_a_regulator_cannot_be_on_two_knobs ( )

Definition at line 127 of file test_hookup.py.

◆ test_aliases_round_trip_and_blanks_are_dropped()

None test_hookup.test_aliases_round_trip_and_blanks_are_dropped ( )
A console name survives the store; an empty one is no name (the tag shows).

Definition at line 145 of file test_hookup.py.

◆ test_the_suggestion_is_what_the_session_always_did()

None test_hookup.test_the_suggestion_is_what_the_session_always_did ( )

Definition at line 48 of file test_hookup.py.

References _session().

Variable Documentation

◆ needs_stand

test_hookup.needs_stand
Initial value:
1= pytest.mark.skipif(
2 not (STAND.exists() and TABLES.is_dir()), reason="stand drawing or tables absent"
3)

Definition at line 34 of file test_hookup.py.

◆ STAND

str test_hookup.STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json"

Definition at line 31 of file test_hookup.py.

◆ STAR

test_hookup.STAR = Path(__file__).resolve().parents[3]

Definition at line 30 of file test_hookup.py.

◆ TABLES

str test_hookup.TABLES = STAR / "feed-twin" / "backend" / "statemachines"

Definition at line 32 of file test_hookup.py.