mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Write errors to stderr, closes #1131
This commit is contained in:
parent
42efb799ea
commit
eae103a82b
4 changed files with 16 additions and 6 deletions
|
|
@ -214,3 +214,10 @@ def test_config_deprecated(ensure_eventloop):
|
|||
assert result.exit_code == 0
|
||||
assert not json.loads(result.output)["allow_download"]
|
||||
assert "will be deprecated in" in result.stderr
|
||||
|
||||
|
||||
def test_sql_errors_logged_to_stderr(ensure_eventloop):
|
||||
runner = CliRunner(mix_stderr=False)
|
||||
result = runner.invoke(cli, ["--get", "/:memory:.json?sql=select+blah"])
|
||||
assert result.exit_code == 1
|
||||
assert "sql = 'select blah', params = {}: no such column: blah\n" in result.stderr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue