def test_should_return_fizzbuzz(self): test_patterns = [ (15, "FizzBuzz"), (30, "FizzBuzz"), ] for number, expected in test_patterns: with self.subTest(number=number, expected=expected): actual = fizzbuzz.execute(number) self.assertEqual(actual, expected)
import fizzbuzz fizzbuzz.execute()
def test_should_return_number_string(self, number, expected): actual = fizzbuzz.execute(number) self.assertEqual(actual, expected)