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

Functions

 cfg ()
 _smoke (cfg, monkeypatch, Exception error)
 test_a_refused_replay_reports_the_design_invalid (cfg, monkeypatch)
 test_any_other_runtime_error_still_surfaces (cfg, monkeypatch)

Variables

 ROOT = Path(__file__).resolve().parents[1]
str REFUSAL = "Solution validation failed:\nIsp is non-positive: -78.52 s"

Detailed Description

A design whose validation replay the chamber solver refuses is invalid, not a crash.

The chamber solver says a solve did not close in two ways: a ``ValueError`` from the
root find, and a ``RuntimeError`` from its own checks on the root it found ("Solution
validation failed: Isp is non-positive"). Layer 1's validation replay caught only the
first, so a smoke search whose last candidate replayed onto a non-physical root --
which is what CI's runners produced, and this machine did not -- took the whole
optimizer down. Here the replay is made to land on that refusal deliberately.

Function Documentation

◆ _smoke()

test_layer1_validation_refusal._smoke ( cfg,
monkeypatch,
Exception error )
protected

◆ cfg()

test_layer1_validation_refusal.cfg ( )

Definition at line 23 of file test_layer1_validation_refusal.py.

◆ test_a_refused_replay_reports_the_design_invalid()

test_layer1_validation_refusal.test_a_refused_replay_reports_the_design_invalid ( cfg,
monkeypatch )

Definition at line 72 of file test_layer1_validation_refusal.py.

References _smoke().

◆ test_any_other_runtime_error_still_surfaces()

test_layer1_validation_refusal.test_any_other_runtime_error_still_surfaces ( cfg,
monkeypatch )
Only the solver's own refusals mean "this design does not close"; a bug is a bug.

Definition at line 80 of file test_layer1_validation_refusal.py.

References _smoke().

Variable Documentation

◆ REFUSAL

str test_layer1_validation_refusal.REFUSAL = "Solution validation failed:\nIsp is non-positive: -78.52 s"

Definition at line 19 of file test_layer1_validation_refusal.py.

◆ ROOT

test_layer1_validation_refusal.ROOT = Path(__file__).resolve().parents[1]

Definition at line 18 of file test_layer1_validation_refusal.py.