Пример #1
0
 def test_no_quotes(self):
     t = Token('foo', 0, 5, T_WORD)
     self.assertEqual(closequote((t,)), ('foo',))
Пример #2
0
 def test_close_double_quote(self):
     t = Token('"foo', 0, 5, T_WORD)
     self.assertEqual(closequote((t,)), ('"foo"',))
Пример #3
0
 def test_close_last_only(self):
     t = Token('"foo', 0, 5, T_WORD)
     self.assertEqual(closequote((t, t)), ('"foo', '"foo"'))
Пример #4
0
 def test_close_single_quote(self):
     t = Token("'foo", 0, 5, T_WORD)
     self.assertEqual(closequote((t,)), ("'foo'",))