-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Feeds: Item Filters #5178
Feeds: Item Filters #5178
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5178 +/- ##
==========================================
- Coverage 88.19% 84.16% -4.03%
==========================================
Files 162 162
Lines 10497 10523 +26
Branches 1517 1522 +5
==========================================
- Hits 9258 8857 -401
- Misses 965 1406 +441
+ Partials 274 260 -14
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, great job!
Sorry, I went ahead of myself. We still need documentation changes (see #4576). |
items = [ | ||
self.MyItem({'foo': 'bar1', 'egg': 'spam1'}), | ||
self.MyItem2({'hello': 'world2', 'foo': 'bar2'}), | ||
{'hello': 'world3', 'egg': 'spam3'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you plan to use these inputs for more tests, can we declare these as constants at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep this in mind next time I add tests.
Scrapy currently doesn't have any convenient APIs to customize conditions for item exports. An
ItemChecker
class can be used by the user to define constraints for acceptable items for particular feeds.Resolves #5161, resolves #4576