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)")
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)')
def setUp(self): self.token = Token(INTEGER, 1)