Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
toruseo committed Jan 16, 2025
1 parent 3efec5a commit 8dc3479
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_verification_straight_road.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ def test_iterative_exec_rigorous_random_size_old():
maxt = 200

while W.check_simulation_ongoing():
duration_t = random.randint(0, maxt)
duration_t = random.randint(1, maxt)
# if hasattr(W, "T"):
# print(W.T, "\t", W.TIME, "\t", duration_t, "\t", W.check_simulation_ongoing())
# else:
Expand Down Expand Up @@ -1092,7 +1092,7 @@ def test_iterative_exec_rigorous_random_size_duration_t2():
maxt = 200

while W.check_simulation_ongoing():
duration_t2 = random.randint(0, maxt)
duration_t2 = random.randint(1, maxt)
# if hasattr(W, "T"):
# print(W.T, "\t", W.TIME, "\t", duration_t2, "\t", W.check_simulation_ongoing())
# else:
Expand Down
2 changes: 1 addition & 1 deletion uxsim/uxsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,7 @@ def exec_simulation(W, until_t=None, duration_t=None, duration_t2=None):
W.simulation_terminated()
return 1 #end of simulation
if end_ts < start_ts:
raise Exception("exec_simulation error: Simulation duration is negative. Check until_t or duration_t")
raise Exception("exec_simulation error: Simulation duration is not positive. Check until_t or duration_t or duration_t2")

#the main loop
#print("preping:", W.T, start_ts, end_ts, W.check_simulation_ongoing())
Expand Down

0 comments on commit 8dc3479

Please sign in to comment.