Skip to content

fix: ensure that MockAnalyze returns a dict for ct#84

Merged
danielolsen merged 1 commit intodevelopfrom
fix_mock_analyze_ct
Mar 20, 2020
Merged

fix: ensure that MockAnalyze returns a dict for ct#84
danielolsen merged 1 commit intodevelopfrom
fix_mock_analyze_ct

Conversation

@danielolsen
Copy link
Copy Markdown
Contributor

Purpose

Make sure that MockAnalyze returns a dictionary when we ask for the change table, even if we don't actually provide one to the object on init. This is needed for the tests for the feature that addresses Breakthrough-Energy/PowerSimData#116

What is the code doing?

If given None for the ct param, return {} on calling get_ct().

Time Estimate

It is one line.

Copy link
Copy Markdown
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

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

It is consistent with the value returned by the get_ct method of the Analyze object when there is no change table. The returned value is set in the constructor of the Scaler object.

@danielolsen danielolsen merged commit abb186c into develop Mar 20, 2020
@danielolsen danielolsen deleted the fix_mock_analyze_ct branch March 20, 2020 17:37
@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