Belle II Software light-2406-ragdoll
|
Public Member Functions | |
def | make_payloads (self, start_revision=1, **payloads) |
def | create_payloads_from_text (self, text) |
def | make_mock_db (self, running_state="RUNNING", staging_state="VALIDATED", running_payloads=None, staging_payloads=None) |
def | parse_operations (self, operations) |
def | test_states (self) |
def | test_overlaps (self) |
def | test_gaps (self) |
def | test_closed (self) |
def | test_start_early (self) |
def | test_simple_mode (self) |
def | test_running_check (self) |
def | test_operations_simple (self) |
def | test_operations_full (self) |
def | test_operations_ragged (self) |
def | test_operations_extend (self) |
def | test_operations_fix_open (self) |
def | test_merge_overlapandgaps (self) |
def | test_doc_example (self) |
def | test_doc_example_full (self) |
def | test_doc_example_fixclosed (self) |
Static Public Attributes | |
dict | RUNNING_BASE |
Basic definition of a running tag to be used later. | |
Test the class to calculate updates to running tags
Definition at line 20 of file test_runningupdate.py.
def create_payloads_from_text | ( | self, | |
text | |||
) |
Create payloads from a plain text list of payloads in the form of payloadN, rev i, valid from a,b to c,d Return a list of lists of payloads where each block of payload definitions without empty lines in between is returned as one list.
Definition at line 49 of file test_runningupdate.py.
def make_mock_db | ( | self, | |
running_state = "RUNNING" , |
|||
staging_state = "VALIDATED" , |
|||
running_payloads = None , |
|||
staging_payloads = None |
|||
) |
Create a mock object that behaves close enough to the ConditionsDB class but returns fixed values for the globaltags "running" and "staging" for testing
Definition at line 75 of file test_runningupdate.py.
def make_payloads | ( | self, | |
start_revision = 1 , |
|||
** | payloads | ||
) |
Create a list of payloads from all keyword arguments Name of the payloads will be the name of the argument, revision will increase monotonic starting at start_revision for each argument and the iovs are the values of the the argument. To create a list with two payloads, A and B with two validities for B and one for A one could use:: make_payloads(A=[(0,0,1,2)], B=[(1,2,3,4), (3,5,6,7)])
Definition at line 32 of file test_runningupdate.py.
def parse_operations | ( | self, | |
operations | |||
) |
Parse the operations into a single list of [operation type, name, revision, iov] for each operation
Definition at line 100 of file test_runningupdate.py.
def test_closed | ( | self | ) |
Test that we get errors on iovs not being open in the staging
Definition at line 177 of file test_runningupdate.py.
def test_doc_example | ( | self | ) |
Extract the example from the `b2conditionsdb tag runningupdate` docstring and run it
Definition at line 421 of file test_runningupdate.py.
def test_doc_example_fixclosed | ( | self | ) |
Extract the example from the `b2conditionsdb tag runningupdate` docstring and run it
Definition at line 474 of file test_runningupdate.py.
def test_doc_example_full | ( | self | ) |
Extract the example from the `b2conditionsdb tag runningupdate` docstring and run it
Definition at line 454 of file test_runningupdate.py.
def test_gaps | ( | self | ) |
Test that we get errors for gaps in the staging
Definition at line 162 of file test_runningupdate.py.
def test_merge_overlapandgaps | ( | self | ) |
Test that merging fails if we have gaps or overlaps
Definition at line 406 of file test_runningupdate.py.
def test_operations_extend | ( | self | ) |
If the staging payloads have same revision as the last one in running merge them
Definition at line 359 of file test_runningupdate.py.
def test_operations_fix_open | ( | self | ) |
Test automatic opening of the last iov if necessary
Definition at line 383 of file test_runningupdate.py.
def test_operations_full | ( | self | ) |
In full mode we close B even if there's nothing in the staging tag to allow "removing" payloads from the set of valid ones
Definition at line 316 of file test_runningupdate.py.
def test_operations_ragged | ( | self | ) |
This time B doesn't start on the spot but a bit later. And A is a list of iovs to be preserved
Definition at line 337 of file test_runningupdate.py.
def test_operations_simple | ( | self | ) |
Test something useful.
Definition at line 296 of file test_runningupdate.py.
def test_overlaps | ( | self | ) |
Test that we get errors on overlaps in the staging
Definition at line 125 of file test_runningupdate.py.
def test_running_check | ( | self | ) |
Test that we get errors on iovs not being open in the staging
Definition at line 275 of file test_runningupdate.py.
def test_simple_mode | ( | self | ) |
Test that we only allow trivial iovs in simple mode
Definition at line 237 of file test_runningupdate.py.
def test_start_early | ( | self | ) |
Test that we get errors if the payloads in the staging tag start too early
Definition at line 200 of file test_runningupdate.py.
def test_states | ( | self | ) |
Test that we get errors if the tags don't exist or are in the wrong state
Definition at line 105 of file test_runningupdate.py.
|
static |
Basic definition of a running tag to be used later.
Definition at line 23 of file test_runningupdate.py.