コード例 #1
0
class FizzBuzzTestCase(unittest.TestCase):
    def setUp(self):
        self.obj = FizzBuzz()

    def tearDown(self):
        del self.obj

    def test_fizz_buzz(self):
        self.assertEqual(self.obj.fizz_buzz(7), ["1", "2", "fizz", "4", "buzz", "fizz", "7"])
コード例 #2
0
class FizzBuzzTestCase(unittest.TestCase):
    def setUp(self):
        self.obj = FizzBuzz()

    def tearDown(self):
        del self.obj

    def test_fizz_buzz(self):
        self.assertEqual(self.obj.fizz_buzz(7),
                         ["1", "2", "fizz", "4", "buzz", "fizz", "7"])
コード例 #3
0
 def setUp(self):
     self.obj = FizzBuzz()
コード例 #4
0
 def setUp(self):
     self.obj = FizzBuzz()