Skip to content

Commit

Permalink
Added type hinting to onedspec. moved spec_id checking to an internal…
Browse files Browse the repository at this point in the history
… function.
  • Loading branch information
cylammarco committed Apr 9, 2023
1 parent aeae019 commit 2c2570d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_onedspec.py
Expand Up @@ -1015,13 +1015,13 @@ def test_calibrator_science():
onedspec.add_user_atlas(
spec_id=[1],
elements=["HeXe"] * 10,
wavelengths=np.arange(10) * 1000,
wavelengths=np.arange(10, 20) * 1000,
stype="science",
)
onedspec.add_user_atlas(
spec_id=[11, 75],
elements=["HeXe"] * 10,
wavelengths=np.arange(10) * 1000,
wavelengths=np.arange(10, 20) * 1000,
stype="science",
)

Expand Down Expand Up @@ -1059,7 +1059,7 @@ def test_calibrator_science():
1
].spectrum_oned.calibrator.atlas.atlas_lines
)
== 18
== 19
)

onedspec.clear_atlas()
Expand All @@ -1086,7 +1086,7 @@ def test_calibrator_science():


# Fail at the RASCAL initilisation
@pytest.mark.xfail(raises=TypeError)
@pytest.mark.xfail(raises=ValueError)
def test_calibrator_science2():
onedspec = spectral_reduction.OneDSpec(
log_file_name=None, log_level="ERROR"
Expand Down

0 comments on commit 2c2570d

Please sign in to comment.