Skip to content

Commit

Permalink
reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseSantosAMD committed Jul 13, 2023
1 parent 94554b4 commit a447779
Showing 1 changed file with 7 additions and 56 deletions.
63 changes: 7 additions & 56 deletions source/python/gui/source/tests/test_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit a447779

Please sign in to comment.