示例#1
0
 def test_lab_hours_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.lab_hours("3.14")
     with self.assertRaises(Exception):
         CourseVal.lab_hours(-3.14)
     with self.assertRaises(Exception):
         CourseVal.lab_hours(float(24*8))
示例#2
0
 def test_lab_hours(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.lab_hours(3.14)
     except Exception:
         self.fail()