示例#1
0
 def test_fizzbuzz_of(self):
   self.assertEqual(FizzBuzz.of(1), 1)
   self.assertEqual(FizzBuzz.of(2), 2)
   self.assertEqual(FizzBuzz.of(3), "fizz")
   self.assertEqual(FizzBuzz.of(5), "buzz")
   self.assertEqual(FizzBuzz.of(6), "fizz")
   self.assertEqual(FizzBuzz.of(10), "buzz")
   self.assertEqual(FizzBuzz.of(15), "fizzbuzz")
示例#2
0
 def test_div_3(self):
     self.assertEqual(FizzBuzz.of(3), 'Fizz')
示例#3
0
 def test_normal(self):
     self.assertEqual(FizzBuzz.of(1), '1')
示例#4
0
 def test_div_3_5(self):
     self.assertEqual(FizzBuzz.of(15), 'FizzBuzz')
示例#5
0
 def test_div_5(self):
     self.assertEqual(FizzBuzz.of(5), 'Buzz')