diff --git a/sdk/python/kfp/cli/diagnose_me/utility_test.py b/sdk/python/kfp/cli/diagnose_me/utility_test.py index 0b3849372a1..1bbf7895c55 100644 --- a/sdk/python/kfp/cli/diagnose_me/utility_test.py +++ b/sdk/python/kfp/cli/diagnose_me/utility_test.py @@ -25,31 +25,31 @@ class UtilityTest(unittest.TestCase): def test_execute_command_oserror(self): """Testing stdout and stderr is correctly captured upon OSError.""" response = utility.ExecutorResponse() - err_msg = "Testing handling of OSError" + err_msg = 'Testing handling of OSError' - with patch("subprocess.run") as mock_run: + with patch('subprocess.run') as mock_run: mock_run.side_effect = MagicMock(side_effect=OSError(err_msg)) response.execute_command([]) - self.assertEqual(response._stdout, "") + self.assertEqual(response._stdout, '') self.assertEqual(response._stderr, err_msg) def test_execute_command_stdout(self): """Testing stdout output is correctly captured.""" - test_string = "test string" + test_string = 'test string' response = utility.ExecutorResponse() - response.execute_command(["echo", test_string]) + response.execute_command(['echo', test_string]) - self.assertEqual(response._stdout, test_string + "\n") - self.assertEqual(response._stderr, "") + self.assertEqual(response._stdout, test_string + '\n') + self.assertEqual(response._stderr, '') def test_execute_command_stderr(self): """Testing stderr output is correctly captured.""" response = utility.ExecutorResponse() - response.execute_command(["ls", "not_a_real_dir"]) + response.execute_command(['ls', 'not_a_real_dir']) - self.assertEqual(response._stdout, "") - self.assertIn("No such file", response._stderr) + self.assertEqual(response._stdout, '') + self.assertIn('No such file', response._stderr) def test_parse_raw_input_json(self): """Testing json stdout is correctly parsed."""