Skip to content

Commit

Permalink
test: trying to fix unit test issue where the spectrum rt is a dict i…
Browse files Browse the repository at this point in the history
…nstead of numerical
  • Loading branch information
liannette committed Dec 2, 2024
1 parent 642c67c commit 7cd675f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/unit/metabolomics/test_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ def test_has_strain():

def test_to_dict():
"""Test the to_dict method."""
spec = Spectrum("spec1", [100, 200], [0.1, 0.2], 150, 0, {"info": "test"})
spec = Spectrum(
id="spec1",
mz=[100.0, 200.0],
intensity=[0.1, 0.2],
precursor_mz=150.0,
rt=0.0,
metadata={"info": "test"},
)
spec.strains.add(Strain("strain1"))
spec.strains.add(Strain("strain2"))

Expand Down

0 comments on commit 7cd675f

Please sign in to comment.