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