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