Skip to content

Conversation

@GandalfTea
Copy link
Contributor

Pull Request

Summary

  • add unit tests and fake modules for the API and Shard nodes
  • add live tests for the http and grpc servers with fake data
  • add live tests for model file helpers and weight management
  • update pytest discovery to only collect tests/ and match test_* names
  • no library code changes

Motivation

Testing

Changes

List the main changes introduced by this PR

 tests/conftest.py                               | 144 ++++++++++++++++
 tests/fakes/README.md                           |  38 +++++
 tests/fakes/__init__.py                         |  59 +++++++
 tests/fakes/api.py                              | 346 +++++++++++++++++++++++++++++++++++++
 tests/fakes/discovery.py                        |  85 +++++++++
 tests/fakes/grpc.py                             |  78 +++++++++
 tests/fakes/models.py                           |  74 ++++++++
 tests/fakes/mp.py                               |  50 ++++++
 tests/fakes/policies.py                         |  77 +++++++++
 tests/fakes/runtime.py                          | 124 ++++++++++++++
 tests/fakes/shard.py                            | 100 +++++++++++
 tests/fakes/solver.py                           |  11 ++
 tests/fakes/streams.py                          |  32 ++++
 tests/fakes/weight_cache.py                     |  95 +++++++++++
 tests/subsystems/test_api_grpc_server.py        |  87 ++++++++++
 tests/subsystems/test_api_http_server.py        | 747 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/subsystems/test_cluster_manager.py        | 448 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/subsystems/test_inference_manager.py      | 322 +++++++++++++++++++++++++++++++++++
 tests/subsystems/test_model_manager.py          | 264 ++++++++++++++++++++++++++++
 tests/subsystems/test_ring_adapter.py           | 515 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/subsystems/test_shard.py                  | 108 ++++++++++++
 tests/subsystems/test_shard_activation_codec.py | 199 ++++++++++++++++++++++
 tests/subsystems/test_shard_grpc_server.py      |  69 ++++++++
 tests/subsystems/test_shard_http_server.py      | 329 +++++++++++++++++++++++++++++++++++
 tests/subsystems/test_shard_policies.py         |  77 +++++++++
 tests/subsystems/test_shard_policy_impl.py      | 256 ++++++++++++++++++++++++++++
 tests/subsystems/test_shard_runtime.py          | 349 +++++++++++++++++++++++++++++++++++++
 tests/test_cluster_manager_head_node.py         |  62 +++++++
 tests/test_layer_aware_memory_pool.py           | 133 +++++++++++++++
 tests/test_layer_manager.py                     | 210 +++++++++++++++++++++++
 tests/test_memory_pool.py                       | 257 ++++++++++++++++++++++++++++
 tests/test_model_loaders.py                     |  78 +++++++++
 tests/test_stream_manager.py                    |  55 ++++++
 tests/test_tensor_utils.py                      |  33 ++++
 tests/test_utils_misc.py                        |  47 +++++
 tests/test_utils_model_io.py                    |  79 +++++++++
 tests/test_utils_profile_subproc.py             |  18 ++
 tests/test_utils_repack_ops.py                  | 165 ++++++++++++++++++
 tests/test_weight_cache.py                      | 231 +++++++++++++++++++++++++
 42 files changed, 6512 insertions(+), 2 deletions(-)

Type of Change

Mark the relevant option with an 'x'

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD improvement

Testing

Describe the tests you ran and/or how to test these changes

$ uv run pytest

@GandalfTea GandalfTea marked this pull request as ready for review November 24, 2025 02:28
@GandalfTea GandalfTea self-assigned this Nov 24, 2025
- add unit tests and fake modules for the API and Shard  nodes
- add live tests for the http and grpc servers with fake data
- add live tests for model file helpers and weight management
- update pytest discovery to only collect tests/ and match test_* names
- no library code changes
@andthattoo andthattoo merged commit cc1e182 into master Nov 24, 2025
5 checks passed
Yuvrajxms09 pushed a commit to Yuvrajxms09/dnet that referenced this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants