Skip to content

Commit f4eb719

Browse files
committed
ruff format
1 parent 0c44f7d commit f4eb719

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎tests/test_cursor.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def test_executemany():
5656
"INSERT INTO TEST (ID, NAME) VALUES (%(id_name)s, %(name)s) ON duplicate update"
5757
)
5858
assert m is not None, "error parse %(id_name)s"
59-
assert (
60-
m.group(3) == " ON duplicate update"
61-
), "group 3 not ON duplicate update, bug in RE_INSERT_VALUES?"
59+
assert m.group(3) == " ON duplicate update", (
60+
"group 3 not ON duplicate update, bug in RE_INSERT_VALUES?"
61+
)
6262

6363
# https://github.com/PyMySQL/mysqlclient-python/issues/178
6464
m = MySQLdb.cursors.RE_INSERT_VALUES.match(
@@ -74,16 +74,16 @@ def test_executemany():
7474
# list args
7575
data = [(i,) for i in range(10)]
7676
cursor.executemany("insert into test (data) values (%s)", data)
77-
assert cursor._executed.endswith(
78-
b",(7),(8),(9)"
79-
), "execute many with %s not in one query"
77+
assert cursor._executed.endswith(b",(7),(8),(9)"), (
78+
"execute many with %s not in one query"
79+
)
8080

8181
# dict args
8282
data_dict = [{"data": i} for i in range(10)]
8383
cursor.executemany("insert into test (data) values (%(data)s)", data_dict)
84-
assert cursor._executed.endswith(
85-
b",(7),(8),(9)"
86-
), "execute many with %(data)s not in one query"
84+
assert cursor._executed.endswith(b",(7),(8),(9)"), (
85+
"execute many with %(data)s not in one query"
86+
)
8787

8888
# %% in column set
8989
cursor.execute("""\
@@ -94,9 +94,9 @@ def test_executemany():
9494
q = "INSERT INTO percent_test (`A%%`, `B%%`) VALUES (%s, %s)"
9595
assert MySQLdb.cursors.RE_INSERT_VALUES.match(q) is not None
9696
cursor.executemany(q, [(3, 4), (5, 6)])
97-
assert cursor._executed.endswith(
98-
b"(3, 4),(5, 6)"
99-
), "executemany with %% not in one query"
97+
assert cursor._executed.endswith(b"(3, 4),(5, 6)"), (
98+
"executemany with %% not in one query"
99+
)
100100
finally:
101101
cursor.execute("DROP TABLE IF EXISTS percent_test")
102102

0 commit comments

Comments
 (0)