Skip to content

refactor: remove redundant map_demand_to_buses#208

Merged
danielolsen merged 4 commits intodevelopfrom
daniel/consolidate_bus_demand
Feb 5, 2021
Merged

refactor: remove redundant map_demand_to_buses#208
danielolsen merged 4 commits intodevelopfrom
daniel/consolidate_bus_demand

Conversation

@danielolsen
Copy link
Copy Markdown
Contributor

Purpose

Time estimate

10 minutes, mostly for understanding the test changes.

@danielolsen danielolsen self-assigned this Feb 5, 2021
@danielolsen danielolsen changed the title Daniel/consolidate bus demand refactor: remove redundant map_demand_to_buses Feb 5, 2021
Comment thread postreise/analyze/transmission/tests/test_congestion_surplus.py
Copy link
Copy Markdown
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test refactor is clever. Thanks.

@danielolsen
Copy link
Copy Markdown
Contributor Author

The test refactor is clever. Thanks.

I don't remember how I learned that monkeypatch exists, but @jon-hagg used it in PowerSimData so maybe that was it. I think there are many places in our code that could benefit from this, places where our main code is complex to make testing easy, and it would be better to make the main code simple and do something like this for the tests.

@danielolsen danielolsen force-pushed the daniel/consolidate_bus_demand branch from c6dd0d6 to 1bd1011 Compare February 5, 2021 19:47
@danielolsen danielolsen merged commit c688c54 into develop Feb 5, 2021
@danielolsen danielolsen deleted the daniel/consolidate_bus_demand branch February 5, 2021 19:49
@ahurli ahurli mentioned this pull request Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants