示例#1
0
class TokenTest(unittest.TestCase):
    def setUp(self):
        self.token = Token(INTEGER, 1)

    def test_str_method_returns_correct_result(self):
        self.assertEqual(self.token.__str__(), "Token(INTEGER, 1)")

    def test_repr_method_returns_correct_result(self):
        self.assertEqual(self.token.__repr__(), "Token(INTEGER, 1)")
示例#2
0
class TokenTest(unittest.TestCase):
    def setUp(self):
        self.token = Token(INTEGER, 1)

    def test_str_method_returns_correct_result(self):
        self.assertEqual(self.token.__str__(), 'Token(INTEGER, 1)')

    def test_repr_method_returns_correct_result(self):
        self.assertEqual(self.token.__repr__(), 'Token(INTEGER, 1)')
示例#3
0
 def setUp(self):
     self.token = Token(INTEGER, 1)
示例#4
0
 def setUp(self):
     self.token = Token(INTEGER, 1)