Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.1.9
-
None
-
3.10
Description
test_conpy175 unittest fails, if tests are running against server with sql_mode=NO_BACKSLASH_ESCAPES.
Proposal:
def test_conpy175(self): |
default_conf = conf() |
c1 = mariadb.connect(**default_conf) |
str = "Bob's" |
newstr = c1.escape_string(str) |
if c1.server_status & STATUS.NO_BACKSLASH_ESCAPES: |
self.assertEqual(newstr, "Bob''s") |
else: |
self.assertEqual(newstr, "Bob\\'s") |
c1.close()
|