예제 #1
0
def test_fizzbuzz():
    assert fizzbuzz(15) == "FizzBuzz"
예제 #2
0
def test_buzz():
    assert fizzbuzz(5) == "Buzz"
예제 #3
0
def test_number():
    assert fizzbuzz(4) == 4
예제 #4
0
def test_fizz():
    assert fizzbuzz(3) == "Fizz"
예제 #5
0
 def test_fizzbuzz2(self):
     result = sample.fizzbuzz(5)
     self.assertEqual(result, 'buzz')
예제 #6
0
 def test_fizzbuzz3(self):
     result = sample.fizzbuzz(4)
     self.assertEqual(result, 'cascas')
예제 #7
0
    def fizz_test(self):
        self.assertEqual(fizzbuzz(3), "Fizz")
        self.assertEqual(fizzbuzz(6), "Fizz")
        self.assertEqual(fizzbuzz(9), "Fizz")
        self.assertEqual(fizzbuzz(12), "Fizz")
        self.assertEqual(fizzbuzz(18), "Fizz")

        self.assertEqual(fizzbuzz(5), "Buzz")
        self.assertEqual(fizzbuzz(10), "Buzz")
        self.assertEqual(fizzbuzz(20), "Buzz")
        self.assertEqual(fizzbuzz(35), "Buzz")
        self.assertEqual(fizzbuzz(40), "Buzz")

        self.assertEqual(fizzbuzz(15), "FizzBuzz")
        self.assertEqual(fizzbuzz(30), "FizzBuzz")
        self.assertEqual(fizzbuzz(45), "FizzBuzz")
        self.assertEqual(fizzbuzz(60), "FizzBuzz")

        self.assertEqual(fizzbuzz(2), 2)