Skip to content

Commit

Permalink
fix path issues in test_run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FLomb committed Jun 5, 2024
1 parent 0c87d2c commit 0922874
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ramp/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def series_to_average(profile_series, num_days):
from ramp.example.input_file_2 import User_list as User_list2
from ramp.example.input_file_3 import User_list as User_list3

TEST_OUTPUT_PATH = os.path.join(pp.BASE_PATH, "test", "results")
TEST_OUTPUT_PATH = os.path.join(".", "ramp/test", "results")

remove_old_tests = False
for file in os.listdir(TEST_OUTPUT_PATH):
Expand All @@ -108,11 +108,12 @@ def series_to_average(profile_series, num_days):
os.remove(os.path.join(TEST_OUTPUT_PATH, file))

for i, ul in enumerate([User_list1, User_list2, User_list3]):
of_path = os.path.join(pp.BASE_PATH, "test", "results", f"output_file_{i + 1}.csv")
of_path = os.path.join(".", "ramp/test", "results", f"output_file_{i + 1}.csv")
if os.path.exists(of_path) is False:
uc = UseCase(
users=ul,
parallel_processing=False,
random_seed=True
)
uc.initialize(peak_enlarge=0.15, num_days=30)

Expand All @@ -121,7 +122,7 @@ def series_to_average(profile_series, num_days):
pp.export_series(Profiles_list, ofname=of_path)

test_output(
os.path.join(pp.BASE_PATH, "test", "results"),
os.path.join(pp.BASE_PATH, "test"),
os.path.join(".", "ramp/test", "results"),
os.path.join(".", "ramp/test"),
num_input_files=3,
)

0 comments on commit 0922874

Please sign in to comment.