Hello everyone!
Hope you are all safe and healthy!
Below is my testing process along with some changes I made.
Description
I followed the same approach as before: I test each unit in parser.py and then test the module as a whole at the end. As I was testing I noticed that the proxy option does not actually work. It turns out the problem was in the parsing of the --proxy option. Specifically, I had to change update_yaml in parser.py. Nothing big, just an if statement that checks if the key k does not exist in the config dictionary. I also removed None as a "type" in the proxy item in CONFIG_TYPES. This gave me all sorts of problems when trying to fix the proxy problem as in Python type(None) == None is false. Which I know can be confusing because one may easily assume that is the same as type(1) == int but it isn't. None is a special type where there exists only one instance of NoneType. It also turns out we really don't need NoneType as a type for proxy.
List any developers that will be affected or those who you had merge conflicts with.
Context of change
Please add options that are relevant and mark any boxes that apply.
[ ] Software (software that runs on the PC)
[ ] Library (library that runs on the PC)
[x] Tool (tool that assists coding development)
[ ] Other
Type of change
Please mark any boxes that apply.
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
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.
[x] Tested test_parse.py by itself
[x] Tested the entire pytest suite as a whole
[x] Scraped the demo with proxy turned off
[x] scraped the demo with proxy turned on
Checklist:
Please mark any boxes that have been completed.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] New and existing unit tests pass locally with my changes.
[x] Any dependent changes have been merged and published in downstream modules.
Pull Request Template
Hello everyone! Hope you are all safe and healthy! Below is my testing process along with some changes I made.
Description
I followed the same approach as before: I test each unit in
parser.py
and then test the module as a whole at the end. As I was testing I noticed that the proxy option does not actually work. It turns out the problem was in the parsing of the--proxy
option. Specifically, I had to changeupdate_yaml
inparser.py
. Nothing big, just an if statement that checks if the keyk
does not exist in the config dictionary. I also removedNone
as a "type" in the proxy item inCONFIG_TYPES
. This gave me all sorts of problems when trying to fix the proxy problem as in Pythontype(None) == None
is false. Which I know can be confusing because one may easily assume that is the same astype(1) == int
but it isn't. None is a special type where there exists only one instance ofNoneType
. It also turns out we really don't needNoneType
as a type for proxy.List any developers that will be affected or those who you had merge conflicts with.
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_parse.py
by itselfChecklist:
Please mark any boxes that have been completed.