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

Split tests into unit, integration, functional #1136

Closed
LecrisUT opened this issue Oct 16, 2023 · 4 comments · Fixed by #1155
Closed

Split tests into unit, integration, functional #1136

LecrisUT opened this issue Oct 16, 2023 · 4 comments · Fixed by #1155
Milestone

Comments

@LecrisUT
Copy link
Contributor

It is a rather organizational change, but for those familiar with the concepts, it helps them find the tests easier and to know what to expect:

  • unit tests:
    • Tests individual small units of the module: a specific function, class, module, logical unit, etc. As small and self-contained as possible where the errors are simple to track
  • integration tests:
    • Tests how multiple units interact with each other
    • Also tests integration with other external packages which could change with different versions
  • functional tests:
    • Tests the full UI/UX, e.g. the cli, the "public api", etc.
@mwouts
Copy link
Owner

mwouts commented Nov 5, 2023

Hi @LecrisUT , I plan to work on this in the coming days. Would you have an example repo that follows that organisation? I see https://realpython.com/python-testing/#writing-integration-tests , is there any other reference that you'd like me to have a look to?

To be sure of what you expect here, is it fine if I follow e.g. and move the current tests under a series of folders like e.g. unit, functional\cli, functional\contents_manager, integration\pre-commit, and maybe move a few tests under external for the tests that mostly test the compatibility with external packages?

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Nov 5, 2023

Here's an example: https://github.com/packit/packit/.

move the current tests under a series of folders like e.g. unit, functional\cli, functional\contents_manager, integration\pre-commit, and maybe move a few tests under external

Yes, that about sums it. Just make sure there are corresponding marks as well

I'll have some time next weekend as well

@mwouts
Copy link
Owner

mwouts commented Nov 12, 2023

@LecrisUT , @mahendrapaipuri , I am not able to add you as reviewers to #1155, but I think it's getting ready. Would you like to have a look and let me know what you think?

@mwouts mwouts added this to the 1.16.0 milestone Nov 12, 2023
@mahendrapaipuri
Copy link
Contributor

Sure @mwouts! I will take a look at the patch this week.

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 a pull request may close this issue.

3 participants