Summary
tests/helpers/maturin.py has grown to 281 lines and 12 functions serving a single consumer (cuprum/unittests/test_maturin_build.py), introduced as part of a maturin version pin update (PR #59). The module introduces speculative abstractions disproportionate to the problem scope, as acknowledged by the existing follow-up issue #97.
Specific concerns
- Pin-reading logic (
read_expected_maturin_version, read_maturin_pins, and related helpers) is used only by the three tests in test_maturin_build.py and should be inlined there.
- Wheel snapshot parsing is split across too many single-purpose functions; 2–3 primary functions would cover the required behaviour without the current depth of extraction.
- Several helpers exist purely for speculative platform-variability normalisation that no current test exercises.
- The module should not be abstracted further until a second concrete consumer exists and the shared interface can be designed against real requirements.
Resolution
- Inline pin-reading logic directly into
cuprum/unittests/test_maturin_build.py.
- Consolidate wheel snapshot parsing into 2–3 primary functions rather than 12.
- Remove speculative platform-variability normalisation that is unexercised by any current test.
- Defer any re-extraction into a shared helper module until a second concrete consumer exists.
Context
Identified during review of PR #59 (maturin 1.6.0 → 1.13.3 version bump).
Related issue: #97.
Raised by @leynos.
Summary
tests/helpers/maturin.pyhas grown to 281 lines and 12 functions serving a single consumer (cuprum/unittests/test_maturin_build.py), introduced as part of a maturin version pin update (PR #59). The module introduces speculative abstractions disproportionate to the problem scope, as acknowledged by the existing follow-up issue #97.Specific concerns
read_expected_maturin_version,read_maturin_pins, and related helpers) is used only by the three tests intest_maturin_build.pyand should be inlined there.Resolution
cuprum/unittests/test_maturin_build.py.Context
Identified during review of PR #59 (maturin 1.6.0 → 1.13.3 version bump).
Related issue: #97.
Raised by @leynos.