I'm testing `[pytest].xdist_enabled = true` . I wo...
# general
r
I'm testing
[pytest].xdist_enabled = true
. I wonder if I should add pytest-xdist on
[pytest].extra_requirements
(I guess yes given it is on the default value). And also I don't see much difference. The execution seems to set
-n 1
on the pytest command line. But I have 2 cpus. Is it expected?
s
the final value for
-n
is set by the engine, and depends on the number of other processes Pants is concurrently running - so if you have many tests running at the same time it makes sense they might all end up with
-n 1
šŸ˜¢
I just put up a PR to enable testing multiple python files within a single
pytest
process - Iā€™m excited to play around with combining that feature with
xdist
to get one process with a big value for
-n
r
oh, so on my 2 cpus machine, if pants runs two pytest processes, it's expected to see -
n 1
, right?
s
yup
r
Ah ok. I guess it won't change my run time then šŸ™‚ thanks!