| 4 | |
| 5 | |
| 6 | def test_sqlresult_str_includes_all_fields() -> None: |
| 7 | result = SQLResult( |
| 8 | preamble='before', |
| 9 | header=['id'], |
| 10 | rows=[(1,)], |
| 11 | postamble='after', |
| 12 | status='ok', |
| 13 | command={'name': 'watch', 'seconds': 1.0}, |
| 14 | ) |
| 15 | |
| 16 | assert 'before' in str(result) |
| 17 | assert "['id']" in str(result) |
| 18 | assert '[(1,)]' in str(result) |
| 19 | assert 'after' in str(result) |
| 20 | assert 'ok' in str(result) |
| 21 | assert "{'name': 'watch', 'seconds': 1.0}" in str(result) |
| 22 | |
| 23 | |
| 24 | def test_sqlresult_status_plain_handles_none_and_formatted_text() -> None: |