osmose.engine_cs.selftest

Self-test of the C# engine for a deployed environment (plan task 1.13, spec section 9.7).

Run it as its own process, with the interpreter and environment that will host the engine (the service’s, the image’s):

python -m osmose.engine_cs.selftest

It loads the .NET runtime and runs one year of the bundled Bay of Biscay demo through the public CSharpEngine.run_in_memory path, then checks the frames. Exit 0 with one OK line, or exit 1 with a FAIL line naming the reason. It must not be imported into a process that forks or that may host the CLR for something else (spec section 8.5): it is a command, not a library.

Functions

main()

problems(frames, expected_rows)

What is wrong with a run's frames: each must have expected_rows rows, a Time column that increases, finite non-negative species values, and some biomass left at the end.