示例#1
0
 def test_fizz_buzz__4_returns_4_as_str(self):
     self.assertEqual("4", fizz_buzz(4))
示例#2
0
 def test_fizz_buzz__3_returns_fizz(self):
     self.assertEqual("fizz", fizz_buzz(3))
示例#3
0
 def test_fizz_buzz__5_returns_buzz(self):
     self.assertEqual("buzz", fizz_buzz(5))
示例#4
0
 def test_fizz_buzz__15_returns_fizzbuzz(self):
     self.assertEqual("fizzbuzz", fizz_buzz(15))
示例#5
0
 def test_is_number_not_divisible_by_three_and_five(self):
     self.assertEqual("7", fizz_buzz(7))
示例#6
0
 def test_is_number_divisible_by_three(self):
     # fizz_buzz=FizzBuzz()
     self.assertEqual("Fizz", fizz_buzz(3))
示例#7
0
 def test_is_number_divisible_by_three_and_five(self):
     self.assertEqual("FizzBuzz", fizz_buzz(15))
示例#8
0
 def test_is_number_divisible_by_five(self):
     self.assertEqual("Buzz", fizz_buzz(5))
示例#9
0
 def test_divisible_by_3(self):
     """
     Test if is divisible with 4
     """
     self.assertEqual(fizz_buzz(3), 'fizz')
示例#10
0
 def test_divisible_by_5_and_3(self):
     """
     Test if is divisible by 5 and 3
     """
     self.assertEqual(fizz_buzz(3 * 5), 'fizzbuzz')
示例#11
0
 def test_divisible_by_5(self):
     """
     Test if is divisible by 5
     """
     self.assertEqual(fizz_buzz(5), 'buzz')