From a2f710f3a818802ec040e08fddeecc69aa508881 Mon Sep 17 00:00:00 2001 From: Thomas Sell Date: Mon, 29 Jan 2024 14:52:11 +0100 Subject: [PATCH] linting --- tests/test_write_assay.py | 21 +++++++++++---------- tests/test_write_study.py | 8 ++------ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/tests/test_write_assay.py b/tests/test_write_assay.py index a8a382b..234ff6b 100644 --- a/tests/test_write_assay.py +++ b/tests/test_write_assay.py @@ -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, @@ -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 @@ -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 @@ -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='"') diff --git a/tests/test_write_study.py b/tests/test_write_study.py index fad361a..2eb15d3 100644 --- a/tests/test_write_study.py +++ b/tests/test_write_study.py @@ -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, @@ -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] \ No newline at end of file + assert snapshot == [str(r.message) for r in record]