ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.AnaAlgorithmConfig.TestAlgProperties Class Reference

Test case for the algorithm property handling. More...

Inheritance diagram for python.AnaAlgorithmConfig.TestAlgProperties:
Collaboration diagram for python.AnaAlgorithmConfig.TestAlgProperties:

Public Member Functions

def setUp (self)
 Common setup for the tests. More...
 
def test_propaccess (self)
 Test that properties that got set, can be read back. More...
 
def test_nonexistentprop (self)
 Test that an unset property can't be accessed. More...
 

Public Attributes

 config
 

Detailed Description

Test case for the algorithm property handling.

Definition at line 445 of file AnaAlgorithmConfig.py.

Member Function Documentation

◆ setUp()

def python.AnaAlgorithmConfig.TestAlgProperties.setUp (   self)

Common setup for the tests.

Definition at line 448 of file AnaAlgorithmConfig.py.

448  def setUp( self ):
449  self.config = AnaAlgorithmConfig( "Type/Name" )
450  pass
451 

◆ test_nonexistentprop()

def python.AnaAlgorithmConfig.TestAlgProperties.test_nonexistentprop (   self)

Test that an unset property can't be accessed.

Definition at line 463 of file AnaAlgorithmConfig.py.

463  def test_nonexistentprop( self ):
464  with self.assertRaises( AttributeError ):
465  value = self.config.Prop3
466  pass
467  pass
468 

◆ test_propaccess()

def python.AnaAlgorithmConfig.TestAlgProperties.test_propaccess (   self)

Test that properties that got set, can be read back.

Definition at line 453 of file AnaAlgorithmConfig.py.

453  def test_propaccess( self ):
454  self.config.Prop1 = "Value1"
455  self.config.Prop2 = [ "Value2" ]
456  self.assertEqual( self.config.Prop1, "Value1" )
457  self.assertEqual( self.config.Prop2, [ "Value2" ] )
458  self.assertNotEqual( self.config.Prop1, "Foo" )
459  self.assertNotEqual( self.config.Prop2, "Value2" )
460  pass
461 

Member Data Documentation

◆ config

python.AnaAlgorithmConfig.TestAlgProperties.config

Definition at line 449 of file AnaAlgorithmConfig.py.


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