def test010_test_output(self): '''count_letters: testing output of function is an integer Your count_letters function is not returning an integer ''' self.assertEqual(type(lab5.count_letters('asdf', 'a')), int)
def test010_test_output(self): '''count_letters: testing output of function is an integer Your count_letters function is not returning an integer ''' self.assertEqual(type(lab5.count_letters('asdf','a')), int)
def test015_test_output(self): '''count_letters: testing output of function is correct Your count_letters function should return 5 for these arguments: 'aaaaa','a' ''' self.assertEqual(lab5.count_letters('aaaaa', 'a'), 5)
def test015_test_output(self): '''count_letters: testing output of function is correct Your count_letters function should return 5 for these arguments: 'aaaaa','a' ''' self.assertEqual(lab5.count_letters('aaaaa','a'), 5)
def test020_test_output(self): '''count_letters: testing output of function is correct Your count_letters function is not returning the correct output ''' for a0, a1 in [('aaaa', 'a'), ('aaaa', 'b'), ('abcdabcd', 'd'), ('asdf', '')]: self.assertEqual(lab5.count_letters(a0, a1), sum(1 for c in a0 if c == a1))
def test020_test_output(self): '''count_letters: testing output of function is correct Your count_letters function is not returning the correct output ''' for a0,a1 in [('aaaa','a'), ('aaaa','b'), ('abcdabcd','d'), ('asdf','')]: self.assertEqual( lab5.count_letters(a0,a1),sum(1 for c in a0 if c==a1) )