Beispiel #1
0
 def testIsConstrainedNumberOnNegativeNumber (self):
     
     # Setup with file known to exist, with section and key known to exist.
     tstCV = ConfigValues (self.EXISTING_FILENAME)
     tstCV.InitConfig()
     
     resultIntNeg = tstCV.GetOption (self.EXISTING_SECTIONNAME, 
                                     self.EXISTING_KEYNAME_INTNEG)
     
     assert ConfigValues.isConstrainedNumber (resultIntNeg, int) == False
Beispiel #2
0
 def testIsConstrainedNumberOnFloat (self):
     
     # Setup with file known to exist, with section and key known to exist.
     tstCV = ConfigValues (self.EXISTING_FILENAME)
     tstCV.InitConfig()
     
     resultFloat = tstCV.GetOption (self.EXISTING_SECTIONNAME, 
                                    self.EXISTING_KEYNAME_FLOAT)
     
     assert ConfigValues.isConstrainedNumber (resultFloat, float) == True