tardis-sn / stardis

TARDIS stellar radiative transfer
https://tardis-sn.github.io/stardis/
11 stars 15 forks source link

Add some basic tests for the Voigt module #94

Closed smokestacklightnin closed 1 year ago

smokestacklightnin commented 1 year ago

:pencil: Description

Type: :vertical_traffic_light: testing

This pull request adds a few basic tests to the opacities.voigt module. The tests are parametrized to test several input values and also include tests to raise errors when a division by zero is attempted.

:pushpin: Resources

How to parametrize pytest fixtures and test functions

Examples for parametrized test functions

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #94 (bcc07c5) into main (0b48514) will increase coverage by 1.54%. Report is 9 commits behind head on main. The diff coverage is 76.66%.

:exclamation: Current head bcc07c5 differs from pull request most recent head 0dce29b. Consider uploading reports for the commit 0dce29b to get more accurate results

@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   33.44%   34.99%   +1.54%     
==========================================
  Files          15       16       +1     
  Lines         592      623      +31     
==========================================
+ Hits          198      218      +20     
- Misses        394      405      +11     
Files Changed Coverage Δ
stardis/plasma/base.py 43.93% <0.00%> (ø)
stardis/transport/base.py 25.49% <0.00%> (ø)
stardis/model/base.py 16.27% <33.33%> (+0.89%) :arrow_up:
stardis/model/geometry/radial1d.py 66.66% <66.66%> (ø)
stardis/io/model/marcs.py 90.76% <75.00%> (-9.24%) :arrow_down:
stardis/io/model/tests/test_model_io.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more