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 424 of file PythonConfig.py.

Member Function Documentation

◆ setUp()

python.PythonConfig.TestAlgProperties.setUp ( self)

Common setup for the tests.

Definition at line 427 of file PythonConfig.py.

427 def setUp( self ):
428 self.config = PythonConfig( "Type/Name" )
429

◆ test_nonexistentprop()

python.PythonConfig.TestAlgProperties.test_nonexistentprop ( self)

Test that an unset property can't be accessed.

Definition at line 440 of file PythonConfig.py.

440 def test_nonexistentprop( self ):
441 with self.assertRaises( AttributeError ):
442 value = self.config.Prop3
443

◆ test_propaccess()

python.PythonConfig.TestAlgProperties.test_propaccess ( self)

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

Definition at line 431 of file PythonConfig.py.

431 def test_propaccess( self ):
432 self.config.Prop1 = "Value1"
433 self.config.Prop2 = [ "Value2" ]
434 self.assertEqual( self.config.Prop1, "Value1" )
435 self.assertEqual( self.config.Prop2, [ "Value2" ] )
436 self.assertNotEqual( self.config.Prop1, "Foo" )
437 self.assertNotEqual( self.config.Prop2, "Value2" )
438

Member Data Documentation

◆ config

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

Definition at line 428 of file PythonConfig.py.


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