コード例 #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')