Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bittremieux committed Jul 24, 2024
1 parent e6fff0e commit 49fd48c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/unit_tests/test_data/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,12 @@ def seq_no_d(spec):
parsed = pl.from_arrow(
MgfParser(
mgf_small,
custom_fields=CustomField(
"seq", seq_no_d, pa.string()
),
custom_fields=CustomField("seq", seq_no_d, pa.string()),
).iter_batches(None)
)

assert len(parsed) == 1
assert_series_equal(parsed["seq"], pl.Series("seq", ["LESLIEK"]))
assert_series_equal(parsed["seq"], pl.Series("seq", ["LESLIEK"]))

# Invalid custom fields will cause all spectra to get skipped.
parser = MgfParser(
Expand All @@ -223,7 +221,7 @@ def seq_no_d(spec):
)

with pytest.warns(
UserWarning, match=r"Skipped 2 spectra with invalid information.*"
UserWarning, match=r"Skipped 2 spectra with invalid information.*"
):
spectra = list(parser.iter_batches(None))
assert len(spectra) == 0
Expand Down

0 comments on commit 49fd48c

Please sign in to comment.