|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| None | test_a_species_can_be_added_at_runtime () |
| None | test_a_species_file_can_be_layered_on_top (Path tmp_path) |
| None | test_a_backend_that_is_not_coolprop_can_join_a_chain () |
| None | test_measured_data_wins_where_it_has_coverage () |
| None | test_measured_data_refuses_outside_its_grid_rather_than_extrapolating () |
| None | test_measured_data_rejects_unregistered_properties () |
| None | test_a_new_property_can_be_registered () |
| None | test_shipped_species_are_declared_as_data_not_code () |
| list[str] | tomllib_keys (Path path) |
Variables | |
| _value = value | |
The extension points, exercised from outside the package. "Nothing hardcoded" is a claim that decays silently. Adding a special case is always the cheap move in the moment, and nothing fails when the seam quietly stops working -- the code still runs, it just can no longer be extended without editing it. These tests are what makes that failure loud. Each one adds something *from the outside*, the way a project using this library would, and asserts it took effect without touching the package: * a species that is not in ``species.toml`` * a whole species file layered on top of the shipped one * a backend that is not CoolProp at all * measured data placed in front of an equation of state * a property this package never heard of If any of these needs a change inside ``feedtwin/props`` to pass, the seam it covers is gone.
| None test_props_modularity.test_a_backend_that_is_not_coolprop_can_join_a_chain | ( | ) |
The seam is the protocol, not the library behind it. A deliberately absurd backend -- constant density, nothing else -- proves the chain talks to the protocol and never to CoolProp specifically. This is what a REFPROP or Modelica media backend would slot into.
Definition at line 81 of file test_props_modularity.py.
| None test_props_modularity.test_a_new_property_can_be_registered | ( | ) |
Quantities this package never shipped can still flow through it.
Definition at line 171 of file test_props_modularity.py.
| None test_props_modularity.test_a_species_can_be_added_at_runtime | ( | ) |
Argon is not in species.toml. It works anyway, with no code change.
Definition at line 46 of file test_props_modularity.py.
| None test_props_modularity.test_a_species_file_can_be_layered_on_top | ( | Path | tmp_path | ) |
A project can ship its own fluid table; later definitions win.
Definition at line 57 of file test_props_modularity.py.
| None test_props_modularity.test_measured_data_refuses_outside_its_grid_rather_than_extrapolating | ( | ) |
An extrapolated measurement has a measurement's authority and a guess's accuracy, so the backend must decline instead.
Definition at line 153 of file test_props_modularity.py.
| None test_props_modularity.test_measured_data_rejects_unregistered_properties | ( | ) |
A table of numbers with no declared unit is not data, it is a guess.
Definition at line 163 of file test_props_modularity.py.
| None test_props_modularity.test_measured_data_wins_where_it_has_coverage | ( | ) |
The Phase 12 principle, working in Phase 01. A measured grid in front of the equation of state overrides it inside the measured region and falls through outside it -- and nobody writes the "do we have data here?" branch, because the chain is that branch.
Definition at line 124 of file test_props_modularity.py.
| None test_props_modularity.test_shipped_species_are_declared_as_data_not_code | ( | ) |
species.toml is the registry; the package holds no fluid list. A guard against the obvious regression: someone adds a fluid by writing it into Python because that felt quicker, and the data path quietly becomes decorative.
Definition at line 189 of file test_props_modularity.py.
References tomllib_keys().
| list[str] test_props_modularity.tomllib_keys | ( | Path | path | ) |
Definition at line 206 of file test_props_modularity.py.
Referenced by test_shipped_species_are_declared_as_data_not_code().
|
protected |
Definition at line 95 of file test_props_modularity.py.