Esempio n. 1
0
 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());
Esempio n. 2
0
 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())
Esempio n. 3
0
 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());
Esempio n. 4
0
 def testIsNormalWithoutNormalStatusAndNormalRange(self):
     count = DvCount(accuracy=0, accuracy_is_percent=False, magnitude=1)
     with self.assertRaises(TypeError):
         count.is_normal()