def testOK(self): good_values = [1, 2.909, 0, 123,456,789.0, '12345'] for num in good_values: self.assertTrue(courier.is_numeric(num))
def testNotOK(self): bad_values = ['c', '2.9o9'] for num in bad_values: self.assertFalse(courier.is_numeric(num))