diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py index 6e3545d9b98..ec8a496f6f2 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py @@ -6,8 +6,8 @@ import logging import os import os.path -import subprocess import shutil +import subprocess import sys import tempfile import uuid @@ -1140,7 +1140,7 @@ def test_flow_build_executable(self): ) # Start the Python script as a subprocess app_file = Path(temp_dir, "app.py").as_posix() - process = subprocess.Popen(['python', app_file], stderr=subprocess.PIPE) + process = subprocess.Popen(["python", app_file], stderr=subprocess.PIPE) try: # Wait for a specified time (in seconds) wait_time = 5 @@ -1148,8 +1148,10 @@ def test_flow_build_executable(self): if process.returncode == 0: pass else: - raise Exception(f"Process terminated with exit code {process.returncode}, " - f"{process.stderr.read().decode('utf-8')}") + raise Exception( + f"Process terminated with exit code {process.returncode}, " + f"{process.stderr.read().decode('utf-8')}" + ) except (subprocess.TimeoutExpired, KeyboardInterrupt): pass finally: @@ -1530,13 +1532,9 @@ def test_run_file_with_set_priority(self, pf) -> None: def test_data_scrubbing(self): # Prepare connection run_pf_command( - "connection", - "create", - "--file", - f"{CONNECTIONS_DIR}/custom_connection.yaml", - "--name", - "custom_connection") - + "connection", "create", "--file", f"{CONNECTIONS_DIR}/custom_connection.yaml", "--name", "custom_connection" + ) + # Test flow run run_pf_command( "flow", @@ -1561,7 +1559,7 @@ def test_data_scrubbing(self): "print_secret", "--inputs", "conn=custom_connection", - "inputs.topic=atom" + "inputs.topic=atom", ) output_path = Path(FLOWS_DIR) / "print_secret_flow" / ".promptflow" / "flow-print_secret.node.detail.json" assert output_path.exists()