Ejemplo n.º 1
0
 def test_credits_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.credits("0.5")
     with self.assertRaises(Exception):
         CourseVal.credits(-0.5)
Ejemplo n.º 2
0
 def test_credits(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.credits(0.5)
     except Exception:
         self.fail()