Skip to content

Commit

Permalink
Add regression for alphas
Browse files Browse the repository at this point in the history
  • Loading branch information
light2802 committed Aug 20, 2023
1 parent b1770dc commit e2d78d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions stardis/tests/test_run_stardis_regression.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
from stardis import run_stardis
import numpy as np
from astropy import units as u
import os


def test_run_stardis_regression(data_regression):
def test_run_stardis_regression(ndarrays_regression):
tracing_lambdas = np.arange(6540, 6590, 0.01) * u.Angstrom
sim_result = run_stardis("stardis_example.yml", tracing_lambdas)
data_regression.check(sim_result)
config_fname = "benchmarks/benchmark_config.yml"
base_dir = os.path.abspath(os.path.dirname(config_fname))
config_fname = os.path.basename(config_fname)
os.chdir(base_dir)
sim_result = run_stardis(config_fname, tracing_lambdas)
ndarrays_regression.check({"alphas": sim_result.alphas})
Binary file not shown.
1 change: 1 addition & 0 deletions stardis_env3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ dependencies:
- python-dokuwiki
- coverage
- nbmake
- pytest-regressions

# Code quality
- black =22.3
Expand Down

0 comments on commit e2d78d7

Please sign in to comment.