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
Addressing issues identified in issue #5944 #5945
Conversation
…code and completing functionality for missing methods open_spider and _persist_stats
…to address open issue scrapy#5944
This is intended.
This is intended. It's even documented.
This is wrong.
Please describe which methods were not tested and are tested now.
This is wrong.
Please don't remove random empty files, especially Additionally, please don't submit several unrelated changes as one PR and please don't submit random (and wrong) whitespace changes. Additionally, you have changed |
Also, while splitting tests with many asserts in one method may make sense, writing long docstrings (especially wrong ones) for trivial self-documented comparisons IMO does not. |
Hey, |
Apologizes for not mentioning the changes in the tests/test_utils_display.py before. |
Hi,
I noticed a few issues in the statscollectors.py file and in the test suites in test_stats.py and test_link.py. In particular, the statscollector.py file had two methods that haven't been implemented in the StatsCollector class. These were the open_spinder() and the _persist_spider() methods. I did my best in completing these methods based on the documentation.
Additionally in the same file I noticed that the class DummyStatsCollector has no real functionality and doesn't have any implementation in the project outside the test suite. Thus, I decided that the best way to approach this is to remove the class from the file to reduce the size of the file.
For the two test suites in test_stats.py and test_link.py, I noticed a few issues:
In the test_stats.py:
In the test_link.py, this file didn't have any missing tests and all methods in the link.py file were evaluated; however, the way it was structured it was hard to maintain. Similar to the previous testing file, I have separate each method evaluation to a unique test case and added comments to each test case.
All test cases are evaluated as True when I test the updated code.
Last but not least, there are several empty files in the project that I removed to reduce clutter. These were located at:
Thanks!