STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_gse_actuators.py
Go to the documentation of this file.
1
"""The GSE side of a bottle the drawing does not fill.
2
3
Its charge and dump are the state table's own actuators, `GSE High Press
4
Control` and `GSE High Press Vent`: the one place the session names an actuator
5
itself, because that side has no valve on the drawing for the hookup to bind.
6
Renamed or dropped from the CSV, the built-in charge and dump stopped without a
7
word; now the notes say which row is missing and what no state can do.
8
"""
9
10
from
__future__
import
annotations
11
12
from
dataclasses
import
replace
13
14
from
test_press_path_coupling
import
_helium_stand
15
16
17
def
_without
(session, *names):
# type: ignore[no-untyped-def]
18
machine = session.machine
19
kept = tuple(a
for
a
in
machine.actuators
if
a
not
in
names)
20
session.machine = replace(machine, actuators=kept)
21
22
23
def
test_a_table_with_both_rows_says_nothing
() -> None:
24
session = _helium_stand()
25
assert
not
any(
"no state can"
in
n
for
n
in
session._notes())
26
27
28
def
test_a_table_that_cannot_charge_an_undrawn_bottle_says_so
() -> None:
29
session = _helium_stand()
30
_without
(session,
"GSE High Press Control"
)
31
(said,) = [n
for
n
in
session._notes()
if
"no state can"
in
n]
32
assert
"'GSE High Press Control'"
in
said
and
said.endswith(
"can charge it."
)
33
34
35
def
test_and_one_that_can_neither_charge_nor_dump_it_says_both
() -> None:
36
session = _helium_stand()
37
_without
(session,
"GSE High Press Control"
,
"GSE High Press Vent"
)
38
(said,) = [n
for
n
in
session._notes()
if
"no state can"
in
n]
39
assert
"'GSE High Press Vent'"
in
said
and
said.endswith(
"charge or dump it."
)
test_gse_actuators.test_a_table_that_cannot_charge_an_undrawn_bottle_says_so
None test_a_table_that_cannot_charge_an_undrawn_bottle_says_so()
Definition
test_gse_actuators.py:28
test_gse_actuators._without
_without(session, *names)
Definition
test_gse_actuators.py:17
test_gse_actuators.test_a_table_with_both_rows_says_nothing
None test_a_table_with_both_rows_says_nothing()
Definition
test_gse_actuators.py:23
test_gse_actuators.test_and_one_that_can_neither_charge_nor_dump_it_says_both
None test_and_one_that_can_neither_charge_nor_dump_it_says_both()
Definition
test_gse_actuators.py:35
lib
feedtwin
tests
test_gse_actuators.py
Generated by
1.15.0