Ejemplo n.º 1
0
 def test_quote_returns_bytes_when_input_is_bytes(self):
     self.assertTrue(isinstance(quoted(b'hello'), bytes))
Ejemplo n.º 2
0
 def test_quote_escapes_backlash_character(self):
     self.assertEqual('"hello\\\\world"', quoted('hello\\world'))
Ejemplo n.º 3
0
 def test_quote_returns_str_when_input_is_str(self):
     self.assertTrue(isinstance(quoted('hello'), str))
Ejemplo n.º 4
0
 def test_quote_encloses_string_in_dquote_character(self):
     self.assertEqual('"hello"', quoted('hello'))
Ejemplo n.º 5
0
 def test_quote_escapes_dquote_character(self):
     self.assertEqual('"hello\\"world"', quoted('hello"world'))
Ejemplo n.º 6
0
 def test_quote_returns_bytes_when_input_is_bytes(self):
     self.assertTrue(isinstance(quoted(b'hello'), bytes))
Ejemplo n.º 7
0
 def test_quote_returns_str_when_input_is_str(self):
     self.assertTrue(isinstance(quoted('hello'), str))
Ejemplo n.º 8
0
 def test_quote_escapes_backlash_character(self):
     self.assertEqual('"hello\\\\world"', quoted('hello\\world'))
Ejemplo n.º 9
0
 def test_quote_escapes_dquote_character(self):
     self.assertEqual('"hello\\"world"', quoted('hello"world'))
Ejemplo n.º 10
0
 def test_quote_encloses_string_in_dquote_character(self):
     self.assertEqual('"hello"', quoted('hello'))