Closed thebigG closed 4 years ago
Looks good. Thank you for putting so much work into the unittests @thebigG.
Looks good. Thank you for putting so much work into the unittests @thebigG.
Not problem! You are very welcome. I hope to keep working on testing because I really like this project and hope to see it get better in the future :)
Tools.py tests and conftest.py file
Hi everyone!
Hope you are all well and healthy!
Description
I have added tests for
tools.py
totest_tools.py
. Followed the same approach as before; test each unit as isolated as possible from each other. I have also added aconftest.py
file to our testing suite. Thisconftest.py
file is loaded automatically when you run pytest. This is really useful because it allows to have things like fixtures, mocking code and any initialization we might need to do before tests all in one place. All kinds of testing automation can be done through thisconftest.py
file! This also allows us to avoid code duplication. For more info on pytest and all of its awesome features, you can read all of their awesome docs here. I have also refactoredtest_validate.py
so that it uses our fixtures.Context of change
Please add options that are relevant and mark any boxes that apply.
Type of change
Please mark any boxes that apply.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
test_validate.py
by itselftest_tools.py
by itselfChecklist:
Please mark any boxes that have been completed.