Breakthrough-Energy / PostREISE

Analyze and plot post simulation data
https://breakthrough-energy.github.io/docs/
MIT License
6 stars 13 forks source link

Improve test coverage for plotting function plot_bar_shortfall #362

Closed rouille closed 2 years ago

rouille commented 2 years ago

Pull Request doc

Purpose

Improve test coverage of the plot_bar_shortfall function. The docstring of the function is formatted. Closes #361.

What the code is doing

N/A

Testing

Add new tests to hit missing statements. More specifically, the function is called with new sets of the areas parameter. Before:

Name                                                                     Stmts   Miss Branch BrPart  Cover
----------------------------------------------------------------------------------------------------------
postreise/plot/plot_bar_shortfall.py                                        89     16     48      9    80%

After:

Name                                                                     Stmts   Miss Branch BrPart  Cover
----------------------------------------------------------------------------------------------------------
postreise/plot/plot_bar_shortfall.py                                        89      5     48      5    93%

Where to look

The test_plot_bar_shortfall module.

Usage Example/Visuals

N/A

Time estimate

2min