Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/tests #137

Merged
merged 7 commits into from
Aug 10, 2023
Merged

Fix/tests #137

merged 7 commits into from
Aug 10, 2023

Conversation

PaulScheerRLI
Copy link
Collaborator

Included fixes:

  • Make test_simulate more robust, by adding a developer mode setting in the args.
    If args.propagate_mode_errors is set to True, mode simulation will reraise errors to allow for better testing.

  • Make test_schedule more robust
    test_get_negative_rotations is more clear by making it apparent why which rotations should be negative
    test_get_negative_rotations was influenced by testing the consumption, since changes in vehicle_types propagted through the test. This has been fixed by using a deepcopy of vehicle types for consumption mutation,
    basic_run in test_schedule was refactored making it more readable and making use of the new simulate functionality "pre_simulate"

Copy link
Collaborator

@stefansc1 stefansc1 left a comment

Choose a reason for hiding this comment

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

You will need to update util.get_args as well to include the propagate_mode_errors setting. Otherwise, it will not be defined normally and the program will crash when a mode runs into an error.

simba/simulate.py Outdated Show resolved Hide resolved
simba/simulate.py Outdated Show resolved Hide resolved
simba/util.py Outdated Show resolved Hide resolved
@stefansc1 stefansc1 merged commit d7fae9c into dev Aug 10, 2023
@stefansc1 stefansc1 deleted the fix/tests branch August 10, 2023 11:42
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