ATLAS Offline Software
Loading...
Searching...
No Matches
python.PythonConfig.TestAlgProperties Class Reference

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

Inheritance diagram for python.PythonConfig.TestAlgProperties:
Collaboration diagram for python.PythonConfig.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 = PythonConfig( "Type/Name" )

Detailed Description

Test case for the algorithm property handling.

Definition at line 450 of file PythonConfig.py.

Member Function Documentation

◆ setUp()

python.PythonConfig.TestAlgProperties.setUp ( self)

Common setup for the tests.

Definition at line 453 of file PythonConfig.py.

453 def setUp( self ):
454 self.config = PythonConfig( "Type/Name" )
455 pass
456

◆ test_nonexistentprop()

python.PythonConfig.TestAlgProperties.test_nonexistentprop ( self)

Test that an unset property can't be accessed.

Definition at line 468 of file PythonConfig.py.

468 def test_nonexistentprop( self ):
469 with self.assertRaises( AttributeError ):
470 value = self.config.Prop3
471 pass
472 pass
473

◆ test_propaccess()

python.PythonConfig.TestAlgProperties.test_propaccess ( self)

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

Definition at line 458 of file PythonConfig.py.

458 def test_propaccess( self ):
459 self.config.Prop1 = "Value1"
460 self.config.Prop2 = [ "Value2" ]
461 self.assertEqual( self.config.Prop1, "Value1" )
462 self.assertEqual( self.config.Prop2, [ "Value2" ] )
463 self.assertNotEqual( self.config.Prop1, "Foo" )
464 self.assertNotEqual( self.config.Prop2, "Value2" )
465 pass
466

Member Data Documentation

◆ config

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

Definition at line 454 of file PythonConfig.py.


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