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

Function scoped processes #5

Open
pelme opened this issue Aug 18, 2015 · 1 comment
Open

Function scoped processes #5

pelme opened this issue Aug 18, 2015 · 1 comment
Assignees

Comments

@pelme
Copy link
Member

pelme commented Aug 18, 2015

Currently, watcher_getter is session scoped, which means that the finalizer will be session scoped too. Would it make sense to have watcher_getter_function accept request from the "real" fixture instead of the request from watcher_getter?

The implementations of process fixtures would then have to pass request explicitly:

@pytest.fixture
def celery(request):
    return watcher_getter(request, 'celery', ['worker'])

(I'm trying to implement a celery worker that run function scoped, will open a separate issue to see if that is a good fit for pytest-services)

@bubenkoff
Copy link
Member

hmm, not sure why would you start/stop process on every test - that's time consuming
I agree with the proposed change - it's useful anyways
please PR

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