Skip to content

Commit

Permalink
Check that test_adapter exist before closing (#3518)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayrnt authored Dec 16, 2024
1 parent 2ac8894 commit af6ec80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sqlmesh/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,8 @@ def create_test(
include_ctes=include_ctes,
)
finally:
test_adapter.close()
if test_adapter:
test_adapter.close()

@python_api_analytics
def test(
Expand Down

0 comments on commit af6ec80

Please sign in to comment.