@@ -60,9 +60,7 @@ def test_datatypes(self):
6060 r = c .fetchone ()
6161 self .assertEqual (b"\x01 " , r [0 ])
6262 self .assertEqual (v [1 :10 ], r [1 :10 ])
63- self .assertEqual (
64- datetime .timedelta (0 , 60 * (v [10 ].hour * 60 + v [10 ].minute )), r [10 ]
65- )
63+ self .assertEqual (datetime .timedelta (0 , 60 * (v [10 ].hour * 60 + v [10 ].minute )), r [10 ])
6664 self .assertEqual (datetime .datetime (* v [- 1 ][:6 ]), r [- 1 ])
6765
6866 c .execute ("delete from test_datatypes" )
@@ -81,13 +79,9 @@ def test_datatypes(self):
8179
8280 # check sequences type
8381 for seq_type in (tuple , list , set , frozenset ):
84- c .execute (
85- "insert into test_datatypes (i, l) values (2,4), (6,8), (10,12)"
86- )
82+ c .execute ("insert into test_datatypes (i, l) values (2,4), (6,8), (10,12)" )
8783 seq = seq_type ([2 , 6 ])
88- c .execute (
89- "select l from test_datatypes where i in %s order by i" , (seq ,)
90- )
84+ c .execute ("select l from test_datatypes where i in %s order by i" , (seq ,))
9185 r = c .fetchall ()
9286 self .assertEqual (((4 ,), (8 ,)), r )
9387 c .execute ("delete from test_datatypes" )
@@ -138,9 +132,7 @@ def test_binary(self):
138132 """test binary data"""
<
5C7A
/code>139133 data = bytes (bytearray (range (255 )))
140134 conn = self .connect ()
141- self .safe_create_table (
142- conn , "test_binary" , "create table test_binary (b binary(255))"
143- )
135+ self .safe_create_table (conn , "test_binary" , "create table test_binary (b binary(255))" )
144136
145137 with conn .cursor () as c :
146138 c .execute ("insert into test_binary (b) values (_binary %s)" , (data ,))
@@ -287,9 +279,7 @@ def test_single_tuple(self):
287279 """test a single tuple"""
288280 conn = self .connect ()
289281 c = conn .cursor ()
290- self .safe_create_table (
291- conn , "mystuff" , "create table mystuff (id integer primary key)"
292- )
282+ self .safe_create_table (conn , "mystuff" , "create table mystuff (id integer primary key)" )
293283 c .execute ("insert into mystuff (id) values (1)" )
294284 c .execute ("insert into mystuff (id) values (2)" )
295285 c .execute ("select id from mystuff where id in %s" , ((1 ,),))
@@ -364,7 +354,7 @@ def test_bulk_insert(self):
364354
365355 data = [(0 , "bob" , 21 , 123 ), (1 , "jim" , 56 , 45 ), (2 , "fred" , 100 , 180 )]
366356 cursor .executemany (
367- "insert into bulkinsert (id, name, age, height) " " values (%s,%s,%s,%s)" ,
357+ "insert into bulkinsert (id, name, age, height) values (%s,%s,%s,%s)" ,
368358 data ,
369359 )
370360 self .assertEqual (
@@ -414,14 +404,14 @@ def test_bulk_insert_single_record(self):
414404 cursor = conn .cursor ()
415405 data = [(0 , "bob" , 21 , 123 )]
416406 cursor .executemany (
417- "insert into bulkinsert (id, name, age, height) " " values (%s,%s,%s,%s)" ,
407+ "insert into bulkinsert (id, name, age, height) values (%s,%s,%s,%s)" ,
418408 data ,
419409 )
420410 cursor .execute ("commit" )
421411 self ._verify_records (data )
422412
423413 def test_issue_288 (self ):
424- """executemany should work with "insert ... on update" " ""
414+ """executemany should work with "insert ... on update"""
425415 conn = self .connect ()
426416 cursor = conn .cursor ()
427417 data = [(0 , "bob" , 21 , 123 ), (1 , "jim" , 56 , 45 ), (2 , "fred" , 100 , 180 )]
0 commit comments