@@ -134,15 +134,18 @@ def test_it_accepts_environment_variables(self):
134134
135135def test_persistent_cat_file_command (self ):
136136# read header only
137- import subprocess as sp
138137hexsha = "b2339455342180c7cc1e9bba3e9f181f7baa5167"
139- g = self .git .cat_file (batch_check = True , istream = sp .PIPE , as_process = True )
138+ g = self .git .cat_file (
139+ batch_check = True , istream = subprocess .PIPE , as_process = True
140+ )
140141g .stdin .write (b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n " )
141142g .stdin .flush ()
142143obj_info = g .stdout .readline ()
143144
144145# read header + data
145- g = self .git .cat_file (batch = True , istream = sp .PIPE , as_process = True )
146+ g = self .git .cat_file (
147+ batch = True , istream = subprocess .PIPE , as_process = True
148+ )
146149g .stdin .write (b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n " )
147150g .stdin .flush ()
148151obj_info_two = g .stdout .readline ()
@@ -160,7 +163,7 @@ def test_persistent_cat_file_command(self):
160163
161164# same can be achieved using the respective command functions
162165hexsha , typename , size = self .git .get_object_header (hexsha )
163- hexsha , typename_two , size_two , data = self .git .get_object_data (hexsha )# @UnusedVariable
166+ hexsha , typename_two , size_two , _ = self .git .get_object_data (hexsha )
164167self .assertEqual (typename , typename_two )
165168self .assertEqual (size , size_two )
166169
@@ -264,7 +267,7 @@ def test_environment(self, rw_dir):
264267remote .fetch ()
265268except GitCommandError as err :
266269if sys .version_info [0 ] < 3 and is_darwin :
267- self .assertIn ('ssh-orig, ' in str (err ))
270+ self .assertIn ('ssh-orig' , str (err ))
268271self .assertEqual (err .status , 128 )
269272else :
270273self .assertIn ('FOO' , str (err ))
0 commit comments