Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sellth committed Jan 29, 2024
1 parent 2364118 commit a2f710f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
21 changes: 11 additions & 10 deletions tests/test_write_assay.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
import pytest
from syrupy.assertion import SnapshotAssertion

from altamisa.exceptions import (
AdvisoryIsaValidationWarning,
CriticalIsaValidationWarning,
IsaWarning,
ModerateIsaValidationWarning,
ParseIsatabWarning,
)
from altamisa.exceptions import IsaWarning
from altamisa.isatab import (
AssayReader,
AssayValidator,
Expand Down Expand Up @@ -58,14 +52,18 @@ def _parse_write_assert_assay(investigation_file, tmp_path, quote=None, normaliz
assert filecmp.cmp(path_in, path_out, shallow=False)


def test_assay_writer_minimal_assay(minimal_investigation_file, tmp_path, snapshot: SnapshotAssertion):
def test_assay_writer_minimal_assay(
minimal_investigation_file, tmp_path, snapshot: SnapshotAssertion
):
with pytest.warns(IsaWarning) as record:
_parse_write_assert_assay(minimal_investigation_file, tmp_path)
# Check warnings
assert snapshot == [str(r.message) for r in record]


def test_assay_writer_minimal2_assay(minimal2_investigation_file, tmp_path, snapshot: SnapshotAssertion):
def test_assay_writer_minimal2_assay(
minimal2_investigation_file, tmp_path, snapshot: SnapshotAssertion
):
with pytest.warns(IsaWarning) as record:
_parse_write_assert_assay(minimal2_investigation_file, tmp_path)
# Check warnings
Expand All @@ -80,7 +78,9 @@ def test_assay_writer_small_assay(small_investigation_file, tmp_path, snapshot:
assert snapshot == [str(r.message) for r in record]


def test_assay_writer_small2_assay(small2_investigation_file, tmp_path, snapshot: SnapshotAssertion):
def test_assay_writer_small2_assay(
small2_investigation_file, tmp_path, snapshot: SnapshotAssertion
):
with pytest.warns(IsaWarning) as record:
_parse_write_assert_assay(small2_investigation_file, tmp_path, normalize=True)
# Check warnings
Expand Down Expand Up @@ -114,6 +114,7 @@ def test_assay_writer_BII_I_1(BII_I_1_investigation_file, tmp_path, snapshot: Sn
assert snapshot == [str(r.category) for r in record]
assert snapshot == [str(r.message) for r in record]


def test_assay_writer_gelelect(gelelect_investigation_file, tmp_path, snapshot: SnapshotAssertion):
with pytest.warns(IsaWarning) as record:
_parse_write_assert_assay(gelelect_investigation_file, tmp_path, quote='"')
Expand Down
8 changes: 2 additions & 6 deletions tests/test_write_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
import pytest
from syrupy.assertion import SnapshotAssertion

from altamisa.exceptions import (
IsaWarning,
ModerateIsaValidationWarning,
ParseIsatabWarning,
)
from altamisa.exceptions import IsaWarning
from altamisa.isatab import (
InvestigationReader,
InvestigationValidator,
Expand Down Expand Up @@ -84,4 +80,4 @@ def test_study_writer_gelelect(gelelect_investigation_file, tmp_path, snapshot:
_parse_write_assert(gelelect_investigation_file, tmp_path, quote='"')
# Check warnings
assert snapshot == [str(r.category) for r in record]
assert snapshot == [str(r.message) for r in record]
assert snapshot == [str(r.message) for r in record]

0 comments on commit a2f710f

Please sign in to comment.