Skip to content

Commit

Permalink
sphinx-agent: Ensure test exits cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Apr 14, 2024
1 parent c3c2f42 commit c486b96
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/esbonio/tests/sphinx-agent/test_sa_create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ async def test_create_application_error(uri_for, tmp_path_factory):
resolved = config.resolve(test_uri, workspace, logger)
assert resolved is not None

client = await SubprocessSphinxClient(resolved)
assert client.state == ClientState.Errored
try:
client = await SubprocessSphinxClient(resolved)
assert client.state == ClientState.Errored

message = "There is a programmable error in your configuration file:"
assert message in str(client.exception)
message = "There is a programmable error in your configuration file:"
assert message in str(client.exception)
finally:
await client.stop()

0 comments on commit c486b96

Please sign in to comment.