File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -364,8 +364,8 @@ def is_binary(self):
364364 self ._is_binary = is_binary (self .location )
365365 if not self ._is_binary :
366366 try :
367- with open (self .location , 'rb' ) as f :
368- if f .read (5 ) == b' %PDF-' :
367+ with open (self .location , "rb" ) as f :
368+ if f .read (5 ) == b" %PDF-" :
369369 self ._is_binary = True
370370 except Exception :
371371 pass
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ def test_size(self):
398398
399399 def test_is_binary_handles_pdf_signature (self ):
400400 test_dir = self .get_temp_dir ()
401- test_file = os .path .join (test_dir , ' test_pdf.pdf' )
402- with open (test_file , 'wb' ) as f :
403- f .write (b' %PDF-1.4\n Some binary content \x00 \xff ' )
404- assert is_binary (test_file ) is True
401+ test_file = os .path .join (test_dir , " test_pdf.pdf" )
402+ with open (test_file , "wb" ) as f :
403+ f .write (b" %PDF-1.4\n Some binary content \x00 \xff " )
404+ assert is_binary (test_file ) is True
You can’t perform that action at this time.
0 commit comments