Make sure stdout.isatty() is functional during tests