Skip to content

Commit 23bc02e

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

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
@@ -1880,7 +1880,7 @@ def invalidate_environment(self, name: str, sync: bool = False) -> None:
18801880
"""
18811881
name = Environment.sanitize_name(name)
18821882
if self.state_sync.get_environment(name) is None:
1883-
raise SQLMeshError(f"Environment '{name}' does not exist.")
1883+
raise SQLMeshError(f"Environment '{name}' was not found.")
18841884
self.state_sync.invalidate_environment(name)
18851885
if sync:
18861886
self._cleanup_environments(name=name)

tests/core/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ def test_invalidate_environment_nonexistent_raises(sushi_context, mocker: Mocker
19361936
).return_value
19371937
state_sync_mock.get_environment.return_value = None
19381938

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

19421942
state_sync_mock.invalidate_environment.assert_not_called()

0 commit comments

Comments
 (0)