def testPermittedClustersOnly(self): """ All cluster numbers must be in {1, 2, 3, 4, 5}. """ for propertiesDict in PROPERTY_CLUSTERS.values(): for clusterNr in propertiesDict.values(): self.assertIn(clusterNr, {1, 2, 3, 4, 5})
def testNumberOfValues(self): """ Each key in PROPERTY_CLUSTERS must have a dict with 10 elements in it as the value. """ for propertyNames in PROPERTY_CLUSTERS.values(): self.assertEqual([ 'aliphaticity', 'aromaticity', 'composition', 'hydrogenation', 'hydropathy', 'hydroxythiolation', 'iep', 'polar requirement', 'polarity', 'volume' ], sorted(propertyNames.keys()))
def testNumberOfValues(self): """ Each key in PROPERTY_CLUSTERS must have a dict with 10 elements in it as the value. """ for propertyNames in PROPERTY_CLUSTERS.values(): self.assertEqual([ 'aliphaticity', 'aromaticity', 'composition', 'hydrogenation', 'hydropathy', 'hydroxythiolation', 'iep', 'polar requirement', 'polarity', 'volume'], sorted(propertyNames.keys()))
def testAliphaticity(self): """ Aliphaticity must always be in cluster 1. """ for propertiesDict in PROPERTY_CLUSTERS.values(): self.assertEqual(1, propertiesDict['aliphaticity'])
def testPropertyClusterKeys(self): """ The PROPERTY_CLUSTERS dict must contain the right keys. """ self.assertEqual(AA_LETTERS, sorted(PROPERTY_CLUSTERS.keys()))