Example #1
0
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
Example #2
0
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
Example #3
0
 def test_fizz_1(self):
     self.assertEqual(fizz_buzz(3),
                      'Fizz',
                      msg='should return `Fizz` for number divisible by 3')
Example #4
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'
     )
Example #5
0
 def test_fizz_buzz_2(self):
     self.assertEqual(
         fizz_buzz(105),
         'FizzBuzz',
         msg='should return `FizzBuzz` for number divisible by 3 and 5')
Example #6
0
 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')
Example #11
0
from fizz_buzz import *

sample_list = [7, 36, 70, 15]

print fizz_buzz(sample_list)
Example #12
0
 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))