Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in api docs #145

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The ``FitFile`` Object
try:
fitfile = FitFile('/path.to/fitfile.fit')
fitfile.parse()
except FitParseError, e:
except FitParseError as e:
print "Error while parsing .FIT file: %s" % e
sys.exit(1)

Expand Down
7 changes: 6 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 @@ -414,7 +415,11 @@ def test_mismatched_field_size(self):
with warnings.catch_warnings(record=True) as w:
f.parse()
assert w
assert all("falling back to byte encoding" in str(x) for x in w)
assert all(
"falling back to byte encoding" in str(x)
for x in w
if x.category == UserWarning
)
self.assertEqual(len(f.messages), 11293)

def test_unterminated_file(self):
Expand Down
Loading