Description
I'm working to replace our use of Click UI utilities with Rich equivalents. However, I ran into an issue today that prevents me from fully switching over. In particular I cannot yet use rich.prompt.Prompt
& rich.prompt.Confirm
in place of click.prompt
& click.confirm
, respectively.
During tests, the CliRunner
that Click provides temporarily reassigns internal utilities in order to make test assertions work properly. Using the utilities provided by Rich aren't aware of what's happening so assertions break both from expected output and from checks within standard library functions like this line checking if stdin has been switched since the interpreter started.
I'm not sure if this is in scope but I think it should be as I view this library as the foundational project that allows Rich to provide all UI functionality while using Click only for CLI definitions/parsing 😄