PaulMcInnis / JobFunnel

Scrape job websites into a single spreadsheet with no duplicates.
MIT License
1.81k stars 212 forks source link

-Organized fixtures on conftest.py file #67

Closed thebigG closed 4 years ago

thebigG commented 4 years ago

Tools.py tests and conftest.py file

Hi everyone!

Hope you are all well and healthy!

Description

I have added tests for tools.py to test_tools.py. Followed the same approach as before; test each unit as isolated as possible from each other. I have also added a conftest.py file to our testing suite. This conftest.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 this conftest.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 refactored test_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.

Checklist:

Please mark any boxes that have been completed.

studentbrad commented 4 years ago

Looks good. Thank you for putting so much work into the unittests @thebigG.

thebigG commented 4 years ago

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 :)