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)
示例#3
0
 def test_returns_fizz__if_divisible_by_3(self):
     self.assertEqual("Fizz", FizzBuzz.fizzbuzz(3))
示例#4
0
 def test_returns_buzz_if_divisible_by_5(self):
     self.assertEqual("Buzz", FizzBuzz.fizzbuzz(5))
示例#5
0
 def test_returns_fizzbuzz_if_divisible_by_3_and_5(self):
     self.assertEqual("FizzBuzz", FizzBuzz.fizzbuzz(15))
示例#6
0
 def test_returns_number_when_not_divisible_by_3_or_5(self):
     self.assertEqual("8", FizzBuzz.fizzbuzz(8))
示例#7
0
def test_6_returns_Fizz():
    assert FizzBuzz().convert(6) == "Fizz"
示例#8
0
def test_10_returns_Buzz():
    assert FizzBuzz().convert(10) == "Buzz"
示例#9
0
def test_15_returns_Fizz():
    assert FizzBuzz().convert(15) == "FizzBuzz"
示例#10
0
def test_30_returns_Buzz():
    assert FizzBuzz().convert(30) == "FizzBuzz"
示例#11
0
def main():
    fb = FizzBuzz(args.data)
    fb.printFizzBuzz()
示例#12
0
def test_全角数値入力():
    try:
        fz = FizzBuzz("1")
        assert False
    except TypeError:
        assert True
示例#13
0
def test_スペース入力():
    try:
        fz = FizzBuzz(" ")
        assert False
    except TypeError:
        assert True
示例#14
0
def test_文字入力():
    try:
        fz = FizzBuzz("a")
        assert False
    except TypeError:
        assert True
示例#15
0
def test(data, expected):
    fz = FizzBuzz(data)
    assert fz.fizzbuzz == expected