Beispiel #1
0
 def test_number_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.number(1234)
Beispiel #2
0
 def test_number_length(self):
     """ Test that zero-length raises exception """
     with self.assertRaises(Exception):
         CourseVal.number("")
     with self.assertRaises(Exception):
         CourseVal.number("12345")
Beispiel #3
0
 def test_number(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.number("1234")
     except Exception:
         self.fail()