Skip to content

Commit 6289aec

Browse files
committed
fix: use 'was not found' wording to match convention
Signed-off-by: Nishchay Mahor <nishchaymahor@gmail.com>
1 parent 58225e1 commit 6289aec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sqlmesh/core/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ def invalidate_environment(self, name: str, sync: bool = False) -> None:
18571857
"""
18581858
name = Environment.sanitize_name(name)
18591859
if self.state_sync.get_environment(name) is None:
1860-
raise SQLMeshError(f"Environment '{name}' does not exist.")
1860+
raise SQLMeshError(f"Environment '{name}' was not found.")
18611861
self.state_sync.invalidate_environment(name)
18621862
if sync:
18631863
self._cleanup_environments(name=name)

tests/core/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ def test_invalidate_environment_nonexistent_raises(sushi_context, mocker: Mocker
16191619
).return_value
16201620
state_sync_mock.get_environment.return_value = None
16211621

1622-
with pytest.raises(SQLMeshError, match="Environment 'doesnotexist' does not exist"):
1622+
with pytest.raises(SQLMeshError, match="Environment 'doesnotexist' was not found"):
16231623
sushi_context.invalidate_environment("doesnotexist")
16241624

16251625
state_sync_mock.invalidate_environment.assert_not_called()

0 commit comments

Comments
 (0)