Skip to content

Commit a04f1fd

Browse files
restyled-commitsvatsalghelani-csa
authored andcommitted
Restyled by autopep8
1 parent a13f027 commit a04f1fd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/python_testing/execute_python_tests.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@
2121
import argparse
2222

2323
# Function to load environment variables from a YAML file
24+
25+
2426
def load_env_from_yaml(file_path):
2527
"""
2628
Load environment variables from the specified YAML file.
27-
29+
2830
The YAML file contains key-value pairs that define --app environment variables
2931
required for the test scripts to run. These variables configurations needed during the test execution.
30-
32+
3133
This function reads the YAML file and sets the environment variables
3234
in the current process's environment using os.environ.
33-
35+
3436
Args:
3537
file_path (str): The path to the YAML file containing the environment variables.
3638
"""
@@ -40,6 +42,7 @@ def load_env_from_yaml(file_path):
4042
key, value = line.strip().split(': ', 1)
4143
os.environ[key] = value
4244

45+
4346
def main(search_directory, env_file):
4447
# Determine the root directory of the CHIP project
4548
chip_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
@@ -102,10 +105,12 @@ def main(search_directory, env_file):
102105
print(f"Running command: {full_command}")
103106
subprocess.run(full_command, shell=True, check=True)
104107

108+
105109
if __name__ == "__main__":
106110
parser = argparse.ArgumentParser(description="Run Python test scripts.")
107-
parser.add_argument("--search-directory", type=str, default="src/python_testing", help="Directory to search for Python scripts.")
111+
parser.add_argument("--search-directory", type=str, default="src/python_testing",
112+
help="Directory to search for Python scripts.")
108113
parser.add_argument("--env-file", type=str, default="/tmp/test_env.yaml", help="Path to the environment variables file.")
109-
114+
110115
args = parser.parse_args()
111116
main(args.search_directory, args.env_file)

0 commit comments

Comments
 (0)