ATLAS Offline Software
Loading...
Searching...
No Matches
python.AsgServiceConfig.TestServiceProperties Class Reference

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

Inheritance diagram for python.AsgServiceConfig.TestServiceProperties:
Collaboration diagram for python.AsgServiceConfig.TestServiceProperties:

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 = AsgServiceConfig( "Type/Name" )

Detailed Description

Test case for the service property handling.

Definition at line 408 of file AsgServiceConfig.py.

Member Function Documentation

◆ setUp()

python.AsgServiceConfig.TestServiceProperties.setUp ( self)

Common setup for the tests.

Definition at line 411 of file AsgServiceConfig.py.

411 def setUp( self ):
412 self.config = AsgServiceConfig( "Type/Name" )
413 pass
414

◆ test_nonexistentprop()

python.AsgServiceConfig.TestServiceProperties.test_nonexistentprop ( self)

Test that an unset property can't be accessed.

Definition at line 426 of file AsgServiceConfig.py.

426 def test_nonexistentprop( self ):
427 with self.assertRaises( AttributeError ):
428 value = self.config.Prop3
429 pass
430 pass
431

◆ test_propaccess()

python.AsgServiceConfig.TestServiceProperties.test_propaccess ( self)

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

Definition at line 416 of file AsgServiceConfig.py.

416 def test_propaccess( self ):
417 self.config.Prop1 = "Value1"
418 self.config.Prop2 = [ "Value2" ]
419 self.assertEqual( self.config.Prop1, "Value1" )
420 self.assertEqual( self.config.Prop2, [ "Value2" ] )
421 self.assertNotEqual( self.config.Prop1, "Foo" )
422 self.assertNotEqual( self.config.Prop2, "Value2" )
423 pass
424

Member Data Documentation

◆ config

python.AsgServiceConfig.TestServiceProperties.config = AsgServiceConfig( "Type/Name" )

Definition at line 412 of file AsgServiceConfig.py.


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