Skip to content

Commit

Permalink
Fix test that checked warning output
Browse files Browse the repository at this point in the history
  • Loading branch information
pR0Ps committed Jan 14, 2024
1 parent 8ad552d commit 261c10e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def testfile(filename):


class FitFileTestCase(unittest.TestCase):

def test_basic_file_with_one_record(self, endian='<'):
f = FitFile(generate_fitfile(endian=endian))
f.parse()
Expand Down Expand Up @@ -411,7 +412,7 @@ def test_speed(self):

def test_mismatched_field_size(self):
f = FitFile(testfile('coros-pace-2-cycling-misaligned-fields.fit'))
with warnings.catch_warnings(record=True) as w:
with warnings.catch_warnings(record=True, action="ignore", category=DeprecationWarning) as w:
f.parse()
assert w
assert all("falling back to byte encoding" in str(x) for x in w)
Expand Down

0 comments on commit 261c10e

Please sign in to comment.