def testRelationTemperature(self): const = Containers() const.WAY_LENGTH_MAP[90088573] = 1 const.WAY_LENGTH_MAP[90088567] = 2 relationEntity = RelationEntity(const) relationEntity.analyze(relations) self.assertEqual(self.ran.relation_temperature(relationEntity, intersections), 68) intersections[1044247388] = 2 self.assertEqual(self.ran.relation_temperature(relationEntity, intersections), 34)
def testRelationEntity(self): constant = Containers() constant.WAY_LENGTH_MAP[90088573] = 1 constant.WAY_LENGTH_MAP[90088567] = 2 relationEntity = RelationEntity(constant) relationEntity.analyze(relations) self.assertEquals(relationEntity.entity_count, 2) self.assertEqual(relationEntity.num_turnrestrcitions, 1) self.assertEqual(relationEntity.sum_restriction_length, 4) self.assertEqual(relationEntity.sum_turn_restriction_length, 3)