zkat / miette

Fancy extension for std::error::Error with pretty, detailed diagnostic printing.
https://docs.rs/miette
Apache License 2.0
2.03k stars 116 forks source link

Improve robustness of color_format tests #329

Closed Benjamin-L closed 10 months ago

Benjamin-L commented 10 months ago

Previously, these tests would have spurious failures when NO_COLOR or FORCE_COLOR was set in the user's environment, since we weren't clearing one variable before testing a value for the other one. The previous version of the code also did not restore environment variable values on panic, which could cause spurious failures in other tests after one test fails.

zkat commented 10 months ago

Thanks!