()
| 210 | |
| 211 | |
| 212 | def test_with_color(): |
| 213 | @click.command() |
| 214 | def cli(): |
| 215 | click.secho("hello world", fg="blue") |
| 216 | |
| 217 | runner = CliRunner() |
| 218 | |
| 219 | result = runner.invoke(cli) |
| 220 | assert result.output == "hello world\n" |
| 221 | assert not result.exception |
| 222 | |
| 223 | result = runner.invoke(cli, color=True) |
| 224 | assert result.output == f"{click.style('hello world', fg='blue')}\n" |
| 225 | assert not result.exception |
| 226 | |
| 227 | |
| 228 | def test_with_color_errors(): |