configure_output manipulates yansi::Color's global enable toggle; this state is not thread local so changes to it affect the whole program.
This causes the configure_output tests to fail (sporadically) when Cargo chooses to run tests in parallel and when the interleaving of configure_output tests results in Paint::enable being called between configure_output and .paint in another test.
Because we're dealing with a race condition there isn't a great way to reproduce the failures but running:
> until ! cargo test --jobs 10 ; do true; done
Reliably fails for me within a few runs.
Marking these tests with #[serial] (from the serial_test crate) fixes this.
configure_output
manipulatesyansi::Color
's global enable toggle; this state is not thread local so changes to it affect the whole program.This causes the
configure_output
tests to fail (sporadically) when Cargo chooses to run tests in parallel and when the interleaving ofconfigure_output
tests results inPaint::enable
being called betweenconfigure_output
and.paint
in another test.Because we're dealing with a race condition there isn't a great way to reproduce the failures but running:
Reliably fails for me within a few runs.
Marking these tests with
#[serial]
(from theserial_test
crate) fixes this.Closes #28.