def testIsNormalWithNormalStatusAndNormalRange(self): normalRange = DvInterval(DvCount(0), DvCount(2)) normalStatus = CodePhrase("normal statuses", "N") count = DvCount(normal_range=normalRange, normal_status=normalStatus, accuracy=0, accuracy_is_percent=False, magnitude=1) self.assertTrue(count.is_normal());
def testIsNormalWithAbnormalStatus(self): normalStatus = CodePhrase("normal statuses", "L") count = DvCount(normal_status=normalStatus, accuracy=0, accuracy_is_percent=False, magnitude=1) self.assertFalse(count.is_normal())
def testIsNormalWithNoneInclusiveNormalRange(self): normalRange = DvInterval(DvCount(2), DvCount(4)) count = DvCount(normal_range=normalRange, accuracy=0, accuracy_is_percent=False, magnitude=1) self.assertFalse(count.is_normal());
def testIsNormalWithoutNormalStatusAndNormalRange(self): count = DvCount(accuracy=0, accuracy_is_percent=False, magnitude=1) with self.assertRaises(TypeError): count.is_normal()