예제 #1
0
 def test_countOdds_9(self):
     # This is what a test case looks like when you
     # expect that an error will happen
     with self.assertRaises(TypeError):
         x = countOdds("UCSD")
예제 #2
0
 def test_countOdds_6(self):
     self.assertEqual(countOdds((17, 21, 39, 43)), 4)
예제 #3
0
 def test_countOdds_7(self):
     self.assertEqual(countOdds((10, 20, 30, 44)), 0)
예제 #4
0
 def test_countOdds_5(self):
     self.assertEqual(countOdds((10, 21, 30, 43)), 2)
예제 #5
0
 def test_countOdds_4(self):
     self.assertEqual(countOdds((10, 21, 30)), 1)
예제 #6
0
 def test_countOdds_3(self):
     self.assertEqual(countOdds([3]), 1)
예제 #7
0
 def test_countOdds_2(self):
     self.assertEqual(countOdds([2]), 0)
예제 #8
0
 def test_countOdds_1(self):
     self.assertEqual(countOdds([]), 0)