Skip to content

Commit

Permalink
Fix assignment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samakinen committed Feb 6, 2025
1 parent 9ccada3 commit e30c6e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Scripts/tests/emme_only/test_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import logging
from events.model_system_event_listener import EventHandler
import utils.log as log
import numpy

Expand Down Expand Up @@ -70,7 +71,7 @@ def __init__(self):
emme_context.import_scenario(
os.path.join(project_dir, "..", "Network"), scenario_num, "test",
overwrite=True)
self.ass_model = ass.EmmeAssignmentModel(emme_context, scenario_num)
self.ass_model = ass.EmmeAssignmentModel(emme_context, scenario_num, EventHandler())
self.ass_model.prepare_network()

def test_assignment(self):
Expand Down
3 changes: 2 additions & 1 deletion Scripts/tests/unit/test_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pandas
import os

from events.model_system_event_listener import EventHandler
from utils.validate_network import validate
from assignment.emme_bindings.mock_project import MockProject
from assignment.emme_assignment import EmmeAssignmentModel
Expand Down Expand Up @@ -32,7 +33,7 @@ def test_assignment(self):
context.modeller.emmebank.scenario(scenario_id).get_network(),
fares)
ass_model = EmmeAssignmentModel(
context, scenario_id)
context, scenario_id, EventHandler())
ass_model.prepare_network()
peripheral_cost = numpy.arange(10).reshape((1, 10))
ass_model.calc_transit_cost(fares, peripheral_cost)
Expand Down

0 comments on commit e30c6e1

Please sign in to comment.