Skip to content

feat: improve unit tests quality and coverage #433

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fritznastor
Copy link

@fritznastor fritznastor commented Jul 21, 2025

Closes #354

test_flow_integration.py improvements

Here is what I did so far:

  • Switched to a Realistic Public Repository (microsoft/vscode)
  • Expanded Success Path Assertions
  • Added Negative and Edge Case Tests
  • Rate-Limiting and Status Code Tolerance

Copy link
Contributor

@ix-56h ix-56h left a comment

Choose a reason for hiding this comment

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

It's a good start.
We going to merge #427 soon and we have some more typing restriction (for example max_file_size is a int now).

Also, don't be afraid to create a dedicated repo with weird stuff to make specific testing.

Finally, we have a lot of thing to test :

  • Specific commits
  • Specific tag
  • Weird encoding
  • Specific paths
  • Blob files

-lowered max file size from 243 to 200 for all unit tests
-correctly handled missing fields and invalid token unit tests
@fritznastor
Copy link
Author

fritznastor commented Jul 24, 2025

Hey again @ix-56h, I was able to make some hot fixes to my original additions.

Regarding the merge of #427 , do you want me to modify max_file_size to reflect the upcoming typing restriction from str to int? Or should I wait after you and @filipchristiansen merge #427.

Furthermore. since this is my first time contributing to an open source, I'm going to ask a lot of clarifying questions to help me contribute better!

I need some direction/guidance on how to "create a dedicated repo with weird stuff to make specific testing." Any advice on how to begin doing this? I figured I'd start on this dedicated repo after I finished polishing up the rest of the test files that are listed as priority

@fritznastor
Copy link
Author

I'll wait on modifying test_git_utils.py for now until the first two files are all good.

Copy link
Contributor

@ix-56h ix-56h left a comment

Choose a reason for hiding this comment

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

This is pretty good so far !

@fritznastor
Copy link
Author

Hey @ix-56h, I believe test_flow_integration.py and test_ingestion.py are all good now. Let me know if you think of any other specific/weird tests I can add on.

I also added a few test cases to test_git_utils.py for you to review.

@fritznastor
Copy link
Author

The modified test files should be good to go now, I think it's ready to be merged with main.

Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

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

Successfully merging this pull request may close these issues.

feat: improve unit tests quality and coverage
3 participants