Parallel "stock" Python unit tests with 2.0?

I read this ( but it’s not clear how the circleci tool helps me in Python, where you don’t really use filename globbing to identify and split up tasks.

circleci 1.0 used to support this out of the box, but circleci 2.0 does not and I can figure out no solution.

I posted this here (Python parallelization in 2.0 with circleci?) but it was closed without reason, and this guy tried too and got no help (CircleCI 2.0 Parallelism for Django unit test using built in test).

It was probably auto-closed by the forum software for inactivity.

I think the forum is provided by CircleCI for mutual user and volunteer assistance, plus some as-time-allows help from CircleCI employees. I presume in-contract help from employees is given privately. So, not all questions will get assistance.

In any case, it is not true that the question author received no help. There were two requests for clarification, and he/she ignored both of them. It happens! :slight_smile:

Having the same issue as topic starter. Demo Python for CircleCI have TODO to add parallelization but nothing in repo yet.

You want to do something like:

parallelism: 4
            – command: |
                 TESTFILES=$(circleci tests glob “test_dir/**/**.py”)
                  python -m unittest ${TESTFILES}

The TESTFILES var will have a different value in each container, based on $CIRCLE_NODE_INDEX and $CIRCLE_NODE_TOTAL

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.