(monkeypatch)
| 374 | |
| 375 | |
| 376 | def test_source_uses_lf_line_endings(monkeypatch): |
| 377 | stdout = io.BytesIO() |
| 378 | stream = io.TextIOWrapper(stdout, encoding="utf-8", newline="\r\n") |
| 379 | monkeypatch.setattr("click.utils._default_text_stdout", lambda: stream) |
| 380 | |
| 381 | cli = Group("cli", commands=[Command("a"), Command("b")]) |
| 382 | assert shell_complete(cli, {}, "cli", "_CLI_COMPLETE", "zsh_source") == 0 |
| 383 | |
| 384 | stream.flush() |
| 385 | output = stdout.getvalue() |
| 386 | assert b"\r\n" not in output |
| 387 | assert b"\n" in output |
| 388 | |
| 389 | |
| 390 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…