From 4f415bbbb5641b9384bfb2f63aade5c91caea3f9 Mon Sep 17 00:00:00 2001 From: Patrick Upson Date: Mon, 4 Dec 2023 10:41:30 -0400 Subject: [PATCH] took a guess at what was causing the pre-commit.ci falure 'add trailing commas' --- tests/test_read.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_read.py b/tests/test_read.py index 9fff790..68ddad1 100644 --- a/tests/test_read.py +++ b/tests/test_read.py @@ -115,7 +115,9 @@ def test_header_parse(): def test_header_parse_blank_line(): # check that a BTL file can still be loaded if the header section contains blank lines try: - btl = ctd.from_btl(data_path.joinpath("btl", "blank_line_header.btl")) + btl = ctd.from_btl(data_path.joinpath("btl", "blank_line_header.btl",)) + # if a value error wasn't thrown, ensure the names array for the _metadata was set + assert btl._metadata["names"].index("Date") except ValueError as ex: # if the blank line in the header causes the reader to exit before reading the file # the line looking for the Date in the ctd.from_btl() will throw a ValueError. @@ -126,9 +128,6 @@ def test_header_parse_blank_line(): raise AssertionError( "Blank line in BTL file causes _parse_seabird function to exit before setting names") from ex - # if a value error wasn't thrown, ensure the names array for the _metadata was set - assert btl._metadata["names"].index("Date") - def test_pressure_field_labels(): """