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

Change unittest to pytest #20

Open
OlivieFranklova opened this issue Sep 16, 2024 · 0 comments
Open

Change unittest to pytest #20

OlivieFranklova opened this issue Sep 16, 2024 · 0 comments
Labels
low Low priority task

Comments

@OlivieFranklova
Copy link
Collaborator

difference here

Parameter pytest unittest
Test Discovery pytest has an intelligent and automatic test discovery feature. It can find and run test cases based on naming conventions and folder structures, reducing the need for manual configuration. unittest also provides test discovery, but it might require more explicit configuration and setup.
Test Writing pytest allows you to write test functions using plain Python functions. It offers a variety of powerful features like fixtures for setting up test contexts, parameterized testing, and advanced assertion introspection. unittest uses classes and methods for defining test cases. While this provides a structured approach, some developers find the syntax slightly more verbose than pytest.
Assertion Syntax pytest provides clear and expressive failure messages with detailed information on what went wrong. Its assertion introspection helps in quickly identifying issues. unittest also provides assertion methods, but the failure messages might not be as informative as those in pytest.
@OlivieFranklova OlivieFranklova self-assigned this Sep 16, 2024
@OlivieFranklova OlivieFranklova added the low Low priority task label Sep 16, 2024
@OlivieFranklova OlivieFranklova removed their assignment Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low Low priority task
Projects
None yet
Development

No branches or pull requests

1 participant