distributed/tests/test_client.py is currently by far our largest test file with close to 5.5k lines of code with 463 tests. We often require subsets of these tests but running the entire file is very slow and selection of subsets is typically very difficult (there are things like pytest -k but this is only useful to a certain point).
I would like for us to split this file up to reduce iteration times.
In terms of its content, there are various different functionalities tested, e.g.
Core client functionality like submit/map/persist/sync/gather
Client utility functions like call_stack, fire_and_forget, get_versions, as_completed
Multi client / default client functionality
Some scheduler decision making around balanced task distribution, host/resource restrictions, occupancies
Futures (part of client module)
A lot of scattering and replication
File uploads
Some annotation stuff
Cluster dump
Code instrumentation for Computation class
This list is not exhaustive and we may decide to not split like this. This is just to make a point that this file covers a lot of different aspects of our code.
List of tests in test_client.py
```
Test of
Test Client.rebalance(). These are just to test the Client wrapper around
Scheduler.rebalance(); for more thorough tests on the latter see test_scheduler.py.
Test Client.rebalance(). These are just to test the Client wrapper around
Scheduler.rebalance(); for more thorough tests on the latter see test_scheduler.py.
Client.rebalance() internally waits for unfinished futures
rebalance() raises KeyError if explicitly listed futures disappear
distributed/tests/test_client.py
is currently by far our largest test file with close to 5.5k lines of code with 463 tests. We often require subsets of these tests but running the entire file is very slow and selection of subsets is typically very difficult (there are things likepytest -k
but this is only useful to a certain point).I would like for us to split this file up to reduce iteration times.
Top 5
In terms of its content, there are various different functionalities tested, e.g.
Computation
classThis list is not exhaustive and we may decide to not split like this. This is just to make a point that this file covers a lot of different aspects of our code.
List of tests in test_client.py
```