Make constraints tests more robust
- Dominant language
- Python
- Stars
- 33
- Forks
- 19
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 30
Description
> I don't think checking the result of repr is sufficient for many of the tests in this file. In particular those where the repr just says a lambda or function. The relevant lambda or function could be changed to something that produces complete nonsense and these tests would never catch it. It's not really related to this PR though so I'd suggest opening a new issue.
_Originally posted by @SGallagherMet in https://github.com/MetOffice/CSET/pull/765#discussion_r1740967262_
We should make the tests in `test_constraints.py` more robust. This will likely involve making most of them into filter tests.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading test_constraints.py and review the existing tests that only check repr output. Identify which tests should become filter tests, then verify that the revised tests detect incorrect lambda or function behavior rather than accepting arbitrary repr text. Done means the constraints tests meaningfully validate their results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100