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 e08fa70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 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 @@ -412,6 +413,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:
warnings.simplefilter("ignore", DeprecationWarning)
f.parse()
assert w
assert all("falling back to byte encoding" in str(x) for x in w)
Expand Down

0 comments on commit e08fa70

Please sign in to comment.