@@ -57,9 +57,9 @@ def test_executemany():
5757 "INSERT INTO TEST (ID, NAME) VALUES (%(id_name)s, %(name)s) ON duplicate update"
5858 )
5959 assert m is not None , "error parse %(id_name)s"
60- assert (
61- m . group ( 3 ) == " ON duplicate update"
62- ), "group 3 not ON duplicate update, bug in RE_INSERT_VALUES?"
60+ assert m . group ( 3 ) == " ON duplicate update" , (
61+ " group 3 not ON duplicate update, bug in RE_INSERT_VALUES? "
62+ )
6363
6464 # https://github.com/PyMySQL/mysqlclient-python/issues/178
6565 m = MySQLdb .cursors .RE_INSERT_VALUES .match (
@@ -75,16 +75,16 @@ def test_executemany():
7575 # list args
7676 data = [(i ,) for i in range (10 )]
7777 cursor .executemany ("insert into test (data) values (%s)" , data )
78- assert cursor ._executed .endswith (
79- b",(7),(8),(9) "
80- ), "execute many with %s not in one query"
78+ assert cursor ._executed .endswith (b",(7),(8),(9)" ), (
79+ "execute many with %s not in one query "
80+ )
8181
8282 # dict args
8383 data_dict = [{"data" : i } for i in range (10 )]
8484 cursor .executemany ("insert into test (data) values (%(data)s)" , data_dict )
85- assert cursor ._executed .endswith (
86- b",(7),(8),(9) "
87- ), "execute many with %(data)s not in one query"
85+ assert cursor ._executed .endswith (b",(7),(8),(9)" ), (
86+ "execute many with %(data)s not in one query "
87+ )
8888
8989 # %% in column set
9090 cursor .execute (
@@ -97,9 +97,9 @@ def test_executemany():
9797 q = "INSERT INTO percent_test (`A%%`, `B%%`) VALUES (%s, %s)"
9898 assert MySQLdb .cursors .RE_INSERT_VALUES .match (q ) is not None
9999 cursor .executemany (q , [(3 , 4 ), (5 , 6 )])
100- assert cursor ._executed .endswith (
101- b"(3, 4),(5, 6) "
102- ), "executemany with %% not in one query"
100+ assert cursor ._executed .endswith (b"(3, 4),(5, 6)" ), (
101+ "executemany with %% not in one query "
102+ )
103103 finally :
104104 cursor .execute ("DROP TABLE IF EXISTS percent_test" )
105105
0 commit comments