def test_deve_retornar_o_proprio_numero_quando_nao_multiplo_de_3_ou_5(): fizzbuzz = FizzBuzz() assert '1' == fizzbuzz.converter(1)
def test_deve_retornar_buzz_quando_multiplo_de_5(): fizzbuzz = FizzBuzz() assert 'buzz' == fizzbuzz.converter(5)
def test_returns_fizz__if_divisible_by_3(self): self.assertEqual("Fizz", FizzBuzz.fizzbuzz(3))
def test_returns_buzz_if_divisible_by_5(self): self.assertEqual("Buzz", FizzBuzz.fizzbuzz(5))
def test_returns_fizzbuzz_if_divisible_by_3_and_5(self): self.assertEqual("FizzBuzz", FizzBuzz.fizzbuzz(15))
def test_returns_number_when_not_divisible_by_3_or_5(self): self.assertEqual("8", FizzBuzz.fizzbuzz(8))
def test_6_returns_Fizz(): assert FizzBuzz().convert(6) == "Fizz"
def test_10_returns_Buzz(): assert FizzBuzz().convert(10) == "Buzz"
def test_15_returns_Fizz(): assert FizzBuzz().convert(15) == "FizzBuzz"
def test_30_returns_Buzz(): assert FizzBuzz().convert(30) == "FizzBuzz"
def main(): fb = FizzBuzz(args.data) fb.printFizzBuzz()
def test_全角数値入力(): try: fz = FizzBuzz("1") assert False except TypeError: assert True
def test_スペース入力(): try: fz = FizzBuzz(" ") assert False except TypeError: assert True
def test_文字入力(): try: fz = FizzBuzz("a") assert False except TypeError: assert True
def test(data, expected): fz = FizzBuzz(data) assert fz.fizzbuzz == expected