Skip to content

Commit

Permalink
Close session in fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
merelcht committed Jan 13, 2022
1 parent e5393b3 commit cf8979a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions kedro/framework/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def _jsonify_cli_context(ctx: click.core.Context) -> Dict[str, Any]:


def _clear_hook_manager():
from kedro.framework.hooks import get_hook_manager

hook_manager = get_hook_manager()
name_plugin_pairs = hook_manager.list_name_plugin()
for name, plugin in name_plugin_pairs:
Expand Down
4 changes: 3 additions & 1 deletion tests/framework/session/test_session_extension_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ class MockSettings(_ProjectSettings):
_HOOKS = Validator("HOOKS", default=(project_hooks, BeforeNodeRunHook()))

_mock_imported_settings_paths(mocker, MockSettings())
return KedroSession.create(mock_package_name, tmp_path)
session = KedroSession.create(mock_package_name, tmp_path)
yield session
session.close()


class TestBeforeNodeRunHookWithInputUpdates:
Expand Down

0 comments on commit cf8979a

Please sign in to comment.