Belle II Software  release-08-01-10
Test_Machine Class Reference
Inheritance diagram for Test_Machine:
Collaboration diagram for Test_Machine:

Public Member Functions

def setUp (self)
 
def test_initial (self)
 
def test_set (self)
 
def test_bad_set (self)
 
def test_walk (self)
 
def test_walk_stop (self)
 
def test_true_condition (self)
 
def test_false_condition (self)
 
def test_true_conditions (self)
 
def test_halftrue_conditions (self)
 

Public Attributes

 m
 Machine for testing.
 

Detailed Description

Set of tests for checking Machine Base class

Definition at line 14 of file test_caf_machine.py.

Member Function Documentation

◆ setUp()

def setUp (   self)
 

Definition at line 19 of file test_caf_machine.py.

19  def setUp(self):
20  """
21  """
22 
23  self.m = Machine()
24  self.m.add_state("standing")
25  self.m.add_state("walking")
26  self.m.add_transition("walk", "standing", "walking")
27  self.m.add_transition("stop", "walking", "standing")
28  self.m.initial_state = "standing"
29 

◆ test_bad_set()

def test_bad_set (   self)
Checks that machine won't set a state not in the list

Definition at line 46 of file test_caf_machine.py.

◆ test_false_condition()

def test_false_condition (   self)
Check that when a condition for a transition evaulates false it will raise
the correct error.

Definition at line 85 of file test_caf_machine.py.

◆ test_halftrue_conditions()

def test_halftrue_conditions (   self)
Check that when a single condition out of many for a transition evaulates true it will
fail to move to the correct state

Definition at line 117 of file test_caf_machine.py.

◆ test_initial()

def test_initial (   self)
Checks that a new machine sets an initial state correctly

Definition at line 30 of file test_caf_machine.py.

◆ test_set()

def test_set (   self)
Checks that machine sets at a state

Definition at line 39 of file test_caf_machine.py.

◆ test_true_condition()

def test_true_condition (   self)
Check that when a condition for a transition evaulates true it will transition
to the correct state

Definition at line 70 of file test_caf_machine.py.

◆ test_true_conditions()

def test_true_conditions (   self)
Check that when multiple conditions for a transition all evaulate true it will transition
to the correct state

Definition at line 100 of file test_caf_machine.py.

◆ test_walk()

def test_walk (   self)
Checks that machine can transition to a state

Definition at line 53 of file test_caf_machine.py.

◆ test_walk_stop()

def test_walk_stop (   self)
Checks that machine can traverse several states

Definition at line 61 of file test_caf_machine.py.


The documentation for this class was generated from the following file: