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

Functions

 elodin_dir (tmp_path, monkeypatch)
 test_set_get_and_clear (elodin_dir)
 test_normalise_forces_one_line (elodin_dir)
 test_normalise_truncates_to_max_len (elodin_dir)
 test_anyone_can_overwrite_anyone (elodin_dir)
 test_orphans_are_pruned_on_write (elodin_dir)
 test_unreadable_store_degrades_to_no_descriptions (elodin_dir)
 test_write_is_atomic_and_leaves_no_temp_files (elodin_dir)
 test_listing_carries_descriptions (elodin_dir)

Detailed Description

Unit tests for the shared per-run description store.

Run: cd webviewer && .venv/bin/python -m pytest backend/test_descriptions.py -q

Function Documentation

◆ elodin_dir()

backend.test_descriptions.elodin_dir ( tmp_path,
monkeypatch )
A fake ELODIN_DIR with the store beside the runs, as in the real layout.

Definition at line 14 of file test_descriptions.py.

◆ test_anyone_can_overwrite_anyone()

backend.test_descriptions.test_anyone_can_overwrite_anyone ( elodin_dir)

Definition at line 42 of file test_descriptions.py.

◆ test_listing_carries_descriptions()

backend.test_descriptions.test_listing_carries_descriptions ( elodin_dir)

Definition at line 72 of file test_descriptions.py.

◆ test_normalise_forces_one_line()

backend.test_descriptions.test_normalise_forces_one_line ( elodin_dir)

Definition at line 32 of file test_descriptions.py.

◆ test_normalise_truncates_to_max_len()

backend.test_descriptions.test_normalise_truncates_to_max_len ( elodin_dir)

Definition at line 37 of file test_descriptions.py.

◆ test_orphans_are_pruned_on_write()

backend.test_descriptions.test_orphans_are_pruned_on_write ( elodin_dir)

Definition at line 49 of file test_descriptions.py.

◆ test_set_get_and_clear()

backend.test_descriptions.test_set_get_and_clear ( elodin_dir)

Definition at line 23 of file test_descriptions.py.

◆ test_unreadable_store_degrades_to_no_descriptions()

backend.test_descriptions.test_unreadable_store_degrades_to_no_descriptions ( elodin_dir)

Definition at line 60 of file test_descriptions.py.

◆ test_write_is_atomic_and_leaves_no_temp_files()

backend.test_descriptions.test_write_is_atomic_and_leaves_no_temp_files ( elodin_dir)

Definition at line 66 of file test_descriptions.py.