Skip to content

Add unit and integration tests#98

Open
HenryCaldwell wants to merge 7 commits intomainfrom
94-testing
Open

Add unit and integration tests#98
HenryCaldwell wants to merge 7 commits intomainfrom
94-testing

Conversation

@HenryCaldwell
Copy link
Collaborator

Summary

Closes #94

What changed:
Added unit tests for all util functions and integration tests for athlete, run, and hurdle routes. Fixed a bug in transform_feet_to_stride_cycles where no-contact input caused a KeyError on stride_num.

Why:
Test framework had only example tests, added real coverage.

Technical decisions worth noting:
CSV upload and auth route tests were left untouched.

AI disclosure: I determined what needed to be tested for each method and had AI write the corresponding implementations to speed up the process.


Copy link
Collaborator

@bamarler bamarler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall great work! Along with the minor type changes, since you have added tests, some main functions at the bottoms of the scripts are redundant. Can you clean these up please?

Copy link
Collaborator

@bamarler bamarler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the fixes look good, but I think you edited run_service.py unnecessarily

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this file got changed. get_run_metrics() already returns a list[RunResponse], so you're just casting it to itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing

2 participants