Skip to content

Commit

Permalink
Fix flake8 lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chatcannon committed Feb 3, 2024
1 parent 7a6ac1c commit 5cdc620
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/test_BioLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,17 @@ def assert_field_exact(fieldname):
except AttributeError:
pass


def assert_MPR_matches_MPT_v2(mpr, mpt, comments):
"""
Asserts that the fields in the MPR.data ar the same as in the MPT. Modified from assert_MPR_matches_MPT.
Automatically converts dtype from MPT data to dtype from MPR data before comparing the columns.
Speficicity for EIS_indicators : these fields are valid only at f<100kHz so their values are replaced
by -1 or 0 at high frequency in the MPT file, this is not the case in the MPR.data.
Asserts that the fields in the MPR.data ar the same as in the MPT.
Modified from assert_MPR_matches_MPT. Automatically converts dtype from MPT data
to dtype from MPR data before comparing the columns.
Special case for EIS_indicators: these fields are valid only at f<100kHz so their
values are replaced by -1 or 0 at high frequency in the MPT file, this is not the
case in the MPR data.
Parameters
----------
Expand Down Expand Up @@ -293,6 +298,7 @@ def assert_field_exact(fieldname):
except AttributeError:
pass


@pytest.mark.parametrize(
"basename",
[
Expand Down Expand Up @@ -336,6 +342,7 @@ def test_MPR6_matches_MPT6(testdata_dir):
mpr.data = mpr.data[:958] # .mpt file is incomplete
assert_MPR_matches_MPT(mpr, mpt, comments)


@pytest.mark.parametrize(
"basename_v1150",
["v1150_CA", "v1150_CP", "v1150_GCPL", "v1150_GEIS", "v1150_MB", "v1150_OCV", "v1150_PEIS"],
Expand Down

0 comments on commit 5cdc620

Please sign in to comment.