예제 #1
0
 def test_indivisible_2(self):
     self.assertEqual(fizz_buzz(8), 8, msg='should return the number if its in divisible by neither 3 or 5')
예제 #2
0
 def test_fizz_1(self):
     self.assertEqual(fizz_buzz(3), 'Fizz', msg='should return `Fizz` for number divisible by 3')
예제 #3
0
 def test_buzz_2(self):
     self.assertEqual(fizz_buzz(25), 'Buzz', msg='should return `Buzz` for number divisible by 5')
예제 #4
0
 def test_fizz_buzz_2(self):
     self.assertEqual(fizz_buzz(105), 'FizzBuzz', msg='should return `FizzBuzz` for number divisible by 3 and 5')
예제 #5
0
 def test_fizz_1(self):
     self.assertEqual(fizz_buzz(3),
                      'Fizz',
                      msg='should return `Fizz` for number divisible by 3')
예제 #6
0
 def test_indivisible_2(self):
     self.assertEqual(
         fizz_buzz(8),
         8,
         msg='should return the number if its in divisible by neither 3 or 5'
     )
예제 #7
0
 def test_fizz_buzz_2(self):
     self.assertEqual(
         fizz_buzz(105),
         'FizzBuzz',
         msg='should return `FizzBuzz` for number divisible by 3 and 5')
예제 #8
0
 def test_buzz_2(self):
     self.assertEqual(fizz_buzz(25),
                      'Buzz',
                      msg='should return `Buzz` for number divisible by 5')
예제 #9
0
 def test_fizz_buzz(self):
     result = fizzbuzz.fizz_buzz(20)
     self.assertEqual(result, "1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz" +
                      " 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz")