ryanwilsonperkin/pytest-circleci-parallelized

Parallelism doesn't work when pytest is run through tox

Opened this issue · 2 comments

LKay commented

My tests are orchestrated by tox and part of my tox.ini config looks like this:

[testenv]
deps = pipenv
setenv =
    PYTHONPATH = {toxinidir}
whitelist_externals = {homedir}/.local/share/virtualenvs/*
commands =
    pipenv sync --dev
    pipenv run pytest --circleci-parallelize --junitxml=test-results/{envname}/results.xml tests/ {posargs}

I am trying to execute tests in parallel on CircleCI and parameter from the plugin is recognized correctly and outputs message:

collected 5 items                                                              
running 5 items due to CircleCI parallelism

However all test cases are run in full on every instance and are not redistributed between nodes.

Is tox correctly copying the environment variables into the subcommands that it creates to run your pipenv steps?

You may need to specify passenv in your tox.ini