def testValuesMustBeFloats(self): """ Each key in PROPERTY_DETAILS_RAW must have a dict whose values are all floats. """ for properties in PROPERTY_DETAILS_RAW.values(): self.assertTrue(all(type(v) is float for v in properties.values()))
def testNumberOfValues(self): """ Each key in PROPERTY_DETAILS_RAW must have a dict with 10 elements in it as the value. """ for propertyNames in PROPERTY_DETAILS_RAW.values(): self.assertEqual([ 'aliphaticity', 'aromaticity', 'composition', 'hydrogenation', 'hydropathy', 'hydroxythiolation', 'iep', 'polar requirement', 'polarity', 'volume' ], sorted(propertyNames))
def testNumberOfValues(self): """ Each key in PROPERTY_DETAILS_RAW must have a dict with 10 elements in it as the value. """ for propertyNames in PROPERTY_DETAILS_RAW.values(): self.assertEqual([ 'aliphaticity', 'aromaticity', 'composition', 'hydrogenation', 'hydropathy', 'hydroxythiolation', 'iep', 'polar requirement', 'polarity', 'volume'], sorted(propertyNames))
def testPropertyDetailsRawKeys(self): """ The PROPERTY_DETAILS_RAW dict must contain the right keys. """ self.assertEqual(AA_LETTERS, sorted(PROPERTY_DETAILS_RAW.keys()))