@@ -31,6 +31,8 @@ def test_run_git_command_success(self, mock_subprocess_run):
3131 stderr = subprocess .PIPE ,
3232 text = True ,
3333 check = True ,
34+ encoding = "utf-8" ,
35+ errors = "surrogateescape" ,
3436 )
3537
3638 @patch ("subprocess.run" )
@@ -54,6 +56,8 @@ def test_run_git_command_failure(self, mock_subprocess_run):
5456 stderr = subprocess .PIPE ,
5557 text = True ,
5658 check = True ,
59+ encoding = "utf-8" ,
60+ errors = "surrogateescape" ,
5761 )
5862
5963 @patch ("subprocess.run" )
@@ -72,7 +76,13 @@ def test_run_git_command_no_output(self, mock_subprocess_run):
7276 self .assertEqual (output , "" )
7377
7478 mock_subprocess_run .assert_called_once_with (
75- ["git" , "status" ], stdout = subprocess .PIPE , stderr = subprocess .PIPE , text = True , check = True
79+ ["git" , "status" ],
80+ stdout = subprocess .PIPE ,
81+ stderr = subprocess .PIPE ,
82+ text = True ,
83+ check = True ,
84+ encoding = "utf-8" ,
85+ errors = "surrogateescape" ,
7686 )
7787
7888 @patch ("subprocess.run" )
@@ -87,7 +97,13 @@ def test_run_git_command_exception(self, mock_subprocess_run):
8797 self .assertIsNone (output )
8898
8999 mock_subprocess_run .assert_called_once_with (
90- ["git" , "status" ], stdout = subprocess .PIPE , stderr = subprocess .PIPE , text = True , check = True
100+ ["git" , "status" ],
101+ stdout = subprocess .PIPE ,
102+ stderr = subprocess .PIPE ,
103+ text = True ,
104+ check = True ,
105+ encoding = "utf-8" ,
106+ errors = "surrogateescape" ,
91107 )
92108
93109 def test_run_git_command_empty_command (self ):
0 commit comments