Belle II Software  release-05-02-19
TestCAF Class Reference
Inheritance diagram for TestCAF:
Collaboration diagram for TestCAF:

Public Member Functions

def setUp (self)
 
def test_add_calibration (self)
 
def test_add_dependency_on_itself (self)
 
def test_make_output_dir (self)
 
def test_config_output_dir (self)
 
def tearDown (self)
 

Public Attributes

 name1
 Calibration name for use in unittests.
 
 name2
 Calibration name for use in unittests.
 
 name3
 Calibration name for use in unittests.
 
 example_file1
 Path to an example file.
 
 cal1
 Calibration attribute for use in unittests.
 
 cal2
 Calibration attribute for use in unittests.
 
 cal3
 Calibration attribute for use in unittests.
 

Detailed Description

UnitTest for configuration and simple running of CAF

Definition at line 154 of file test_framework.py.

Member Function Documentation

◆ setUp()

def setUp (   self)
Create useful objects for each test and the teardown

Definition at line 159 of file test_framework.py.

159  def setUp(self):
160  """
161  Create useful objects for each test and the teardown
162  """
163 
164  self.name1 = 'TestCalibration1'
165 
166  self.name2 = 'TestCalibration2'
167 
168  self.name3 = 'TestCalibration3'
169  alg = TestAlgo()
170  col = b2.register_module('CaTest')
171 
172  self.example_file1 = Path("example1.root")
173  self.example_file1.touch()
174 
175  self.cal1 = Calibration(self.name1, col, alg, self.example_file1.as_posix())
176 
177  self.cal2 = Calibration(self.name2, col, alg, self.example_file1.as_posix())
178 
179  self.cal3 = Calibration(self.name3, col, alg, self.example_file1.as_posix())
180 

◆ tearDown()

def tearDown (   self)
Removes files that were created during these tests

Definition at line 213 of file test_framework.py.

◆ test_add_calibration()

def test_add_calibration (   self)
Test that add_calibration function results in correct output

Definition at line 181 of file test_framework.py.

◆ test_add_dependency_on_itself()

def test_add_dependency_on_itself (   self)
Test that add_dependency function cannot add itself

Definition at line 190 of file test_framework.py.

◆ test_config_output_dir()

def test_config_output_dir (   self)
Test that config is correctly setting the default output path.

Definition at line 206 of file test_framework.py.

◆ test_make_output_dir()

def test_make_output_dir (   self)
Test that output_dir directory is created correctly

Definition at line 197 of file test_framework.py.


The documentation for this class was generated from the following file:
Calibration
Definition: Calibration.py:1