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
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