From a44777914b69e8990ec5158e23665fe8bfc4ac9f Mon Sep 17 00:00:00 2001 From: JoseSantosAMD Date: Thu, 13 Jul 2023 16:43:35 -0500 Subject: [PATCH] reformatting --- source/python/gui/source/tests/test_graphs.py | 63 +++---------------- 1 file changed, 7 insertions(+), 56 deletions(-) diff --git a/source/python/gui/source/tests/test_graphs.py b/source/python/gui/source/tests/test_graphs.py index fd8651cc5..270816361 100644 --- a/source/python/gui/source/tests/test_graphs.py +++ b/source/python/gui/source/tests/test_graphs.py @@ -52,10 +52,7 @@ path = Path(__file__).parent.absolute() workload_dir = os.path.realpath( - os.path.join( - path, - *"../workloads/causal-cpu-omni-fast-func-e2e/causal".split("/"), - ) + os.path.join(path, *"../workloads/causal-cpu-omni-fast-func-e2e/causal".split("/")) ) titles = [ @@ -219,7 +216,7 @@ def test_parse_files_default(): assert sorted(file_names_run) == sorted(file_names) _samples_df_expected_counts = [138, 152, 276, 138, 152, 828, 138, 152, 138] - samples_df = samples_df.sort_values(by=["location","count"]) + samples_df = samples_df.sort_values(by=["location", "count"]) samples_df_locations = pd.concat( [samples_df[0:3], samples_df[100:103], samples_df[150:153]] )["location"].to_numpy() @@ -335,17 +332,7 @@ def test_parse_files_valid_directory(): "/usr/include/c++/9/ext/string_conversions.h:84", "/usr/include/c++/9/ext/string_conversions.h:85", ] - _samples_df_expected_counts = [ - 152, - 304, - 152, - 152, - 152, - 152, - 3648, - 456, - 760, - ] + _samples_df_expected_counts = [152, 304, 152, 152, 152, 152, 3648, 456, 760] assert (samples_df_locations == _samples_df_expected_locations).all() assert (samples_df_counts == _samples_df_expected_counts).all() @@ -1416,18 +1403,7 @@ def test_compute_sorts(): dict_data[file] = process_data({}, _data, ".*", ".*") results_df = pd.concat( - [ - results_df, - compute_sorts( - compute_speedups( - dict_data, - [], - 0, - [], - False, - ) - ), - ] + [results_df, compute_sorts(compute_speedups(dict_data, [], 0, [], False))] ) expected_speedup = [ @@ -1516,17 +1492,7 @@ def test_parse_uploaded_file(): "/usr/include/c++/9/ext/string_conversions.h:84", "/usr/include/c++/9/ext/string_conversions.h:85", ] - _samples_df_expected_counts = [ - 152, - 304, - 152, - 152, - 152, - 152, - 3648, - 456, - 760, - ] + _samples_df_expected_counts = [152, 304, 152, 152, 152, 152, 3648, 456, 760] with open(file_name) as file: _data = file.read() data, samples_df = parse_uploaded_file(file_name, _data) @@ -1792,12 +1758,7 @@ def test_impact_title_order(): def test_min_points_slider(): my_parser = create_parser(default_settings) - parser_args = my_parser.parse_args( - [ - "-w", - workload_dir, - ] - ) + parser_args = my_parser.parse_args(["-w", workload_dir]) t = multiprocessing.Process(target=causal, args=(parser_args,)) try: @@ -1939,17 +1900,7 @@ def test_verbose_gui_flag_3(): ] t = subprocess.Popen( - [ - sys.executable, - "-m", - "source", - "-w", - workload_dir, - "--verbose", - "3", - "-n", - "0", - ], + [sys.executable, "-m", "source", "-w", workload_dir, "--verbose", "3", "-n", "0"], stdout=subprocess.PIPE, )