Julian / Julian/regret

regret.testing should provide a testing helper for ensuring unexpected deprecations fail tests

Open
#28 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Right now `Recorder` doesn't necessarily have a way to ensure that deprecations are explicitly "expected", so a `Deprecator` can call `Recorder.emit` and if the test case does not check it, nothing will complain (c.f. how `trial.unittest.TestCase` will fail tests that do not flush warnings).

There should be a testing helper provided which can be used to ensure that any deprecation must have `expect` called for it, otherwise a test is failed.

(Perhaps it should then be impossible to do anything *but* expect deprecations in this way -- i.e. impossible to use `Recorder` without accounting for all deprecations).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.