Skip to content

Expand spec for scenario updater flow #1681

@louispt1

Description

@louispt1

Bug Description

The scenario updater was not well tested in the first place, and now that we have updated to a more testable structure, we can take the opportunity to write more comprehensive tests, and assess the existing tests.

A lot of the tests that are there now were ripped from the previous ScenarioUpdater implemenation as they are still relevant for the new format. However, as a result of this issue, I noticed that several parts of the update flow and underlying models etc were lacking testing.

This issue is to write tests for those parts. From my digging, I found tests to be required for:

  • Input::Cache
  • Testing cache method on Input model
  • Input::ScaledInputs
  • ScenarioScaling.input_cache
  • CalculateBalancedValues (scenario updater)
  • ValidateBalance (scenario updater)
  • ScenarioUpdater: test RuntimeError rescue clause
  • Input::Scaler
  • ShareGroups (scenario updater)
  • ScenarioScaling.set_base_with

This is a long list! And there is a chance more stuff is noticed while writing these tests, or by using a coverage tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions