def test_no_fizz_buzz(): """ Comprueba que el numero no es mĂșltiplo de 5 y 3 author: Antonio Lojo y Jose Rosendo """ n1 = 16 assert fizz_buzz(n1) == False
def test_fizz_buzz(): ''' Comprueba que el numero es mĂșltiplo de 5 y 3 author: Antonio Lojo y Jose Rosendo ''' n1 = 15 assert fizz_buzz(n1) == True
def test_fizz_1(self): self.assertEqual(fizz_buzz(3), 'Fizz', msg='should return `Fizz` for number divisible by 3')
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' )
def test_fizz_buzz_2(self): self.assertEqual( fizz_buzz(105), 'FizzBuzz', msg='should return `FizzBuzz` for number divisible by 3 and 5')
def test_buzz_2(self): self.assertEqual(fizz_buzz(25), 'Buzz', msg='should return `Buzz` for number divisible by 5')
def test_if_it_is_divisible_by_5(self): self.assertEqual(fizz_buzz(5), 'buzz')
def test_if_it_is_divisible_by_3(self): self.assertEqual(fizz_buzz(9), 'fizz')
def test_if_it_is_not_divisible_by_3_or_5_he_returns(self): self.assertEqual(fizz_buzz(7), 7)
def test_if_it_is_divisible_by_3_and_5(self): self.assertEqual(fizz_buzz(15), 'fizzbuzz')
from fizz_buzz import * sample_list = [7, 36, 70, 15] print fizz_buzz(sample_list)
def test_given(self): self.assertEqual("1 2 F 4 B F 7 8 F B", fizz_buzz(3, 5, 10)) self.assertEqual("1 F 3 F 5 F B F 9 F 11 F 13 FB 15", fizz_buzz(2, 7, 15))