Skip to content
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

ZyteItemAdapter usage in fixtures #136

Open
wRAR opened this issue Feb 17, 2023 · 1 comment
Open

ZyteItemAdapter usage in fixtures #136

wRAR opened this issue Feb 17, 2023 · 1 comment

Comments

@wRAR
Copy link
Member

wRAR commented Feb 17, 2023

As found in #134, if ZyteItemAdapter is added to ItemAdapter when the fixture is generated, like documented at https://zyte-common-items.readthedocs.io/en/latest/setup.html#configuration , the generated output.json will not contain fields that are empty, and when running the test you need to also add ZyteItemAdapter to ItemAdapter, e.g. via conftest.py. At the same time, we may want to actually emit empty fields.

@wRAR
Copy link
Member Author

wRAR commented Apr 4, 2023

Not sure what parts need to be changed for this after adding a ZyteTestsItemAdapter to zyte-common-items: as web-poet doesn't use zyte-common-items itself and doesn't depend on it (but zyte-common-items depends on web-poet), it doesn't seem right to use an adapter from it to the web-poet testing code. On the other hand, zyte-common-items doesn't configure ItemAdapter, only telling the user how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant