Beispiel #1
0
 def test_lecture_hours_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.lecture_hours("3.14")
     with self.assertRaises(Exception):
         CourseVal.lecture_hours(-3.14)
     with self.assertRaises(Exception):
         CourseVal.lecture_hours(float(24*8))
Beispiel #2
0
 def test_lecture_hours(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.lecture_hours(3.14)
     except Exception:
         self.fail()