Skip to content

--dist and --numprocesses flags conflict #1218

@db434

Description

@db434

I would like to use --dist=worksteal with paralellism enabled. I seem to be getting either parallelism or work stealing, but not both together.

I've followed the advice here to print out all of the pytest configuration options:

def test_answer(pytestconfig):
    for item_name in dir(pytestconfig.option):
        if not item_name.startswith("_"):
            print(f"{item_name}: {getattr(pytestconfig.option, item_name)}")
    assert 0  # to see what was printed

--dist=worksteal only:

$ pytest --dist=worksteal test.py | grep "dist:"
dist: worksteal

With parallelism enabled:

$ pytest --numprocesses=auto --dist=worksteal test.py | grep "dist:"
dist: no
$ pytest --dist=worksteal --numprocesses=auto test.py | grep "dist:"
dist: no

Are my expectations wrong? Is there somewhere else I should be looking to check that workstealing is active?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions