Skip to content

Setting/Emulating nested conftest.py folder structure? #2

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

Open
patrickkidd opened this issue Jan 14, 2022 · 1 comment · May be fixed by #3
Open

Setting/Emulating nested conftest.py folder structure? #2

patrickkidd opened this issue Jan 14, 2022 · 1 comment · May be fixed by #3

Comments

@patrickkidd
Copy link

Gret project. I am trying to prototype individual tests without waiting the 15s to spin up our entire app with necessary db connections etc - ours is a large project. It looks like a notebook would be great for this.

How can I get my notebook to behave as if it is in a certain subfolder in our test suite? I need to gain access to all the fixtures in the current folder and all folders above, as pytest normally does. Example:

project_root/tests/conftest.py
project_root/tests/module_a/conftest.py
project_root/tests/module_a/component_1/conftest.py
project_root/tests/module_a/component_1/test_mymethod.py <-- I want my notebook to run as if it's in this folder, inheriting fixtures from all three conftest.py.

How to do that?

@akaihola akaihola linked a pull request Jan 18, 2022 that will close this issue
@akaihola
Copy link
Owner

Thanks for the idea @patrickkidd! Could you check whether #3 works for you?

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

Successfully merging a pull request may close this issue.

2 participants