def test_no_quotes(self): t = Token('foo', 0, 5, T_WORD) self.assertEqual(closequote((t,)), ('foo',))
def test_close_double_quote(self): t = Token('"foo', 0, 5, T_WORD) self.assertEqual(closequote((t,)), ('"foo"',))
def test_close_last_only(self): t = Token('"foo', 0, 5, T_WORD) self.assertEqual(closequote((t, t)), ('"foo', '"foo"'))
def test_close_single_quote(self): t = Token("'foo", 0, 5, T_WORD) self.assertEqual(closequote((t,)), ("'foo'",))