()
| 80 | |
| 81 | |
| 82 | def test_console_options_update() -> None: |
| 83 | options = ConsoleOptions( |
| 84 | ConsoleDimensions(80, 25), |
| 85 | max_height=25, |
| 86 | legacy_windows=False, |
| 87 | min_width=10, |
| 88 | max_width=20, |
| 89 | is_terminal=False, |
| 90 | encoding="utf-8", |
| 91 | ) |
| 92 | options1 = options.update(width=15) |
| 93 | assert options1.min_width == 15 and options1.max_width == 15 |
| 94 | |
| 95 | options2 = options.update(min_width=5, max_width=15, justify="right") |
| 96 | assert ( |
| 97 | options2.min_width == 5 |
| 98 | and options2.max_width == 15 |
| 99 | and options2.justify == "right" |
| 100 | ) |
| 101 | |
| 102 | options_copy = options.update() |
| 103 | assert options_copy == options and options_copy is not options |
| 104 | |
| 105 | |
| 106 | def test_console_options_update_height() -> None: |
nothing calls this directly
no test coverage detected