Option to set the default distribution algorithm
See original GitHub issueHi, I have the following scenario:
- I have some tests that need to be run in the same worker due to the fact they use a shared object (I know it’s not very idiomatic for unit tests, but it is really the simpler way to check what I need to check)
- I saw the
--dist loadgroup
option, but unfortunately it is not the default, so I should remember to specify every time the command line option - I can’t add it to the
addopts
setting since it errors if I don’t specify either-n
or-tx
, and I want to be able to choose to run the tests the standard way too.
What could work for me is a setting to set the default algorithm to use when --dist
is not specified, so that:
- if I run
pytest
standalone, it doesn’t run in parallel - if I run
pytest -n auto
, it uses the algorithm specified in the setting - if I run
pytest -n auto --dist loadfile
, it overrides the setting with theloadfile
algorithm.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Line Group Configuration - Cisco
The default value is Top Down. For a given distribution algorithm, choose a hunt option for Cisco CallManager to use if a call...
Read more >Distributed tables design guidance - Azure Synapse Analytics
The best choice depends on several factors, and usually involves tradeoffs. Once a distribution column or column set is chosen, you cannot ...
Read more >Genetic Algorithm Options - MATLAB & Simulink - MathWorks
'gacreationuniform' creates a random initial population with a uniform distribution. This is the default when there are no linear constraints, or when there...
Read more >3.5. Setting the Signing Algorithms for Certificates
3.5.1. Setting the CA's Default Signing Algorithm ... Open the CA console. ... In the General Settings tab, set the algorithm to use...
Read more >Load Balancing Algorithms, Types and Techniques - Kemp
Round-robin load balancing is the simplest and most commonly-used load balancing algorithm. Client requests are distributed to application servers in simple ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Opened https://github.com/pytest-dev/pytest-xdist/pull/851. 👍
It can be implemented since we had to do it by using pytest hooks, but it’s quite messy since you have to dig deep inside how the workers read the options