pytest

# test.py

def test():
    f = FizzBuzz()
    assert f.say(3) == 'Fizz'
# test.py

@pytest.fixture
def fizzbuzz():
    return FizzBuzz()

def test(fizzbuzz):
    assert fizzbuzz.say(3) == 'Fizz'
# test.py

@pytest.fixture
def fizzbuzz():
    return FizzBuzz()

@pytest.mark.parametrize('test_input, expected', [
    (3, 'Fizz'),
    (6, 'Fizz'),
    (5, 'Buzz'),
    (10, 'Buzz'),
    (15, 'FizzBuzz'),
    (30, 'FizzBuzz'),
    (2, 2),
    (7, 7),
])
def test(fizzbuzz, test_input, expected):
    assert fizzbuzz.say(test_input) == expected