TEST: add tests for quantecon/timings (#889) - #915
Open
bwcummings1 wants to merge 1 commit into
Open
Conversation
Covers the previously zero-coverage quantecon/timings public API: float_precision get/set, ValueError paths (negative int, float, string), get_default_precision, and global-state restoration via an autouse fixture. Raises quantecon/timings/timings.py coverage 0% -> 100%. AI-Model: poolside Laguna S 2.1 (via orchestrated harness; orchestrator Claude Fable 5 / claude-fable-5) AI-Usage: Laguna drafted the tests from the QuantEcon#889 acceptance criteria and the module source under a bounded directive; the orchestrator specified the coverage targets, reviewed the diff, ran flake8 --select=F401,F405,E231 (clean) and verified the 0->100% coverage delta. Human (repo owner) reviews, validates, and submits this PR and takes responsibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #889. The
quantecon/timingssubpackage had no tests; this adds aquantecon/timings/tests/package (an__init__.pymarker plustest_timings.py, following the per-subpackagetests/convention usedelsewhere in the repo) with 9 tests covering the
public API:
float_precision()getter (no argument returns the current precision)float_precision(n)setter, observable via both the getter andget_default_precision()0and larger valid integersValueErrorfor a negative int, a float, and a string(parametrized)
get_default_precision()reports the live global valueAn autouse fixture snapshots and restores the module global so the tests
never leak precision changes into the rest of the suite.
Coverage for
quantecon/timings/timings.pygoes from 0% to 100%(measured with
coverage run -m pytest quantecon/timingson this branch).flake8 --select=F401,F405,E231is clean. No production code is modified.AI disclosure: these tests were drafted by an AI system — poolside
Laguna S 2.1 in an orchestrated harness (orchestrator: Claude Fable 5) —
from #889's acceptance criteria and the module source. The commit message
carries model/usage detail. I reviewed and validated the tests and the
coverage delta and take responsibility for this contribution.