ATLAS Offline Software
Loading...
Searching...
No Matches
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

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

Public Attributes

 config = AnaAlgorithmConfig( "Type/Name" )

Detailed Description

Test case for the algorithm property handling.

Definition at line 418 of file AnaAlgorithmConfig.py.

Member Function Documentation

◆ setUp()

python.AnaAlgorithmConfig.TestAlgProperties.setUp ( self)

Common setup for the tests.

Definition at line 421 of file AnaAlgorithmConfig.py.

421 def setUp( self ):
422 self.config = AnaAlgorithmConfig( "Type/Name" )
423

◆ test_nonexistentprop()

python.AnaAlgorithmConfig.TestAlgProperties.test_nonexistentprop ( self)

Test that an unset property can't be accessed.

Definition at line 434 of file AnaAlgorithmConfig.py.

434 def test_nonexistentprop( self ):
435 with self.assertRaises( AttributeError ):
436 value = self.config.Prop3
437

◆ test_propaccess()

python.AnaAlgorithmConfig.TestAlgProperties.test_propaccess ( self)

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

Definition at line 425 of file AnaAlgorithmConfig.py.

425 def test_propaccess( self ):
426 self.config.Prop1 = "Value1"
427 self.config.Prop2 = [ "Value2" ]
428 self.assertEqual( self.config.Prop1, "Value1" )
429 self.assertEqual( self.config.Prop2, [ "Value2" ] )
430 self.assertNotEqual( self.config.Prop1, "Foo" )
431 self.assertNotEqual( self.config.Prop2, "Value2" )
432

Member Data Documentation

◆ config

python.AnaAlgorithmConfig.TestAlgProperties.config = AnaAlgorithmConfig( "Type/Name" )

Definition at line 422 of file AnaAlgorithmConfig.py.


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