Test the _format_str method.
()
| 129 | |
| 130 | |
| 131 | def test_format_str(): |
| 132 | """Test the _format_str method.""" |
| 133 | logger = ScreenLogger() |
| 134 | |
| 135 | # Test normal string |
| 136 | normal_str = logger._format_str("test") |
| 137 | assert len(normal_str) == logger._default_cell_size |
| 138 | assert "test" in normal_str |
| 139 | |
| 140 | # Test long string truncation |
| 141 | long_str = "this_is_a_very_long_string_that_should_be_truncated" |
| 142 | formatted = logger._format_str(long_str) |
| 143 | assert len(formatted) == logger._default_cell_size |
| 144 | assert "..." in formatted |
| 145 | |
| 146 | |
| 147 | def test_step(): |
nothing calls this directly
no test coverage detected