MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / test_escape_fallback_encoder

Method test_escape_fallback_encoder

pymysql/tests/test_connection.py:930–937  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

928 self.assertEqual(con.escape(Foo(), mapping), "bar")
929
930 def test_escape_fallback_encoder(self):
931 con = self.connect()
932
933 class Custom(str):
934 pass
935
936 mapping = {str: pymysql.converters.escape_string}
937 self.assertEqual(con.escape(Custom("foobar"), mapping), "'foobar'")
938
939 def test_escape_no_default(self):
940 con = self.connect()

Callers

nothing calls this directly

Calls 3

CustomClass · 0.85
escapeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected