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

A way to control the name of the folder at which tests are created #189

Open
proway2 opened this issue Sep 6, 2023 · 1 comment
Open

Comments

@proway2
Copy link

proway2 commented Sep 6, 2023

There's a way to specify where to create the tests https://scrapy-poet.readthedocs.io/en/stable/testing.html#configuring-the-test-location, but actual paths may look like this: some_project/tests/fixtures/some_project.page_objects.homedepot.com.products.HomedepotComProductPage/test-1 which is way too long and it would be nice to shorten it down to just some_project/tests/fixtures/homedepot.com.products.HomedepotComProductPage/test-1 or even to some_project/tests/fixtures/HomedepotComProductPage/test-1.
So it'd be nice to have a way to control the name of the folder where tests are created at.

@kmike kmike transferred this issue from scrapinghub/scrapy-poet Sep 8, 2023
@kmike
Copy link
Member

kmike commented Sep 8, 2023

I've moved the issue from scrapy-poet issue tracker to web-poet, because web-poet is responsible for this part of the code.

The implementation would require some refactoring / rethinking, because currently the folder name is used as the type name; it's not a cosmetic change:

cls = load_class(self.type_name)

Could you please elaborate on the use case?

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

2 participants