Skip to content

tests: fill in test_naive.py with full NaiveAllocator test suite#1

Open
fpedd wants to merge 3 commits intomainfrom
claude/analyze-test-coverage-ZG3WF
Open

tests: fill in test_naive.py with full NaiveAllocator test suite#1
fpedd wants to merge 3 commits intomainfrom
claude/analyze-test-coverage-ZG3WF

Conversation

@fpedd
Copy link
Owner

@fpedd fpedd commented Feb 18, 2026

The file previously contained only an SPDX header with no tests.
Adds 23 tests covering all key behaviours of NaiveAllocator:

  • Empty and single-allocation edge cases
  • Cumulative/sequential offset calculation
  • No space-reuse even for temporally disjoint allocations
    (contrasting explicitly with greedy behaviour)
  • Preservation of id, size, start, end, kind
  • Output contract (tuple type, length, is_allocated flag)
  • Immutability of input allocations
  • Order sensitivity
  • Determinism
  • Large workload (500 allocations)

https://claude.ai/code/session_01FXB3h2BAUbGFcCDRUTo1sh

The file previously contained only an SPDX header with no tests.
Adds 23 tests covering all key behaviours of NaiveAllocator:
- Empty and single-allocation edge cases
- Cumulative/sequential offset calculation
- No space-reuse even for temporally disjoint allocations
  (contrasting explicitly with greedy behaviour)
- Preservation of id, size, start, end, kind
- Output contract (tuple type, length, is_allocated flag)
- Immutability of input allocations
- Order sensitivity
- Determinism
- Large workload (500 allocations)

https://claude.ai/code/session_01FXB3h2BAUbGFcCDRUTo1sh
- Reorder imports to satisfy isort (I001)
- Break two generator expressions that exceeded the 88-char line limit (E501)

https://claude.ai/code/session_01FXB3h2BAUbGFcCDRUTo1sh
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.

2 participants