You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to issue #11 - which is now closed.
Well done do far with: setting up pre-commit Boom! Setting up test environ x2 Boom! Getting a working app x3 Boom!!!
Now we have pytest, this is a package used to test your code. This is different to pre-commit hooks. Pre-commit hooks utilising mypy, flake8 and black don't test your code, they lint and format your code. They ensure you code is presentable; there is no code smells; and you follow certain style guides (and don't have unused variables, imports etc).
pytest, on the other hand, is where you write tests for your code. Here is some information:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is related to issue #11 - which is now closed.
Well done do far with: setting up pre-commit Boom! Setting up test environ x2 Boom! Getting a working app x3 Boom!!!
Now we have pytest, this is a package used to test your code. This is different to pre-commit hooks. Pre-commit hooks utilising mypy, flake8 and black don't test your code, they lint and format your code. They ensure you code is presentable; there is no code smells; and you follow certain style guides (and don't have unused variables, imports etc).
pytest, on the other hand, is where you write tests for your code. Here is some information:
Enjoy!
Resources
Pytest documentation: https://docs.pytest.org/en/6.2.x/
Demonstration of pytest (video): https://youtu.be/mH_20MOFpew
A quick introduction to pytest (video): https://www.youtube.com/watch?v=FNCVFNDVCCI
Post I've written up (blog): https://shivansivakumaran.com/coding/introduction-to-pytest/
Beta Was this translation helpful? Give feedback.
All reactions