File tree Expand file tree Collapse file tree 4 files changed +30
-19
lines changed
src/snowflake/snowpark/modin/plugin
tests/integ/modin/hybrid/auto_switch_backend Expand file tree Collapse file tree 4 files changed +30
-19
lines changed Original file line number Diff line number Diff line change 170170)
171171from modin .config import AutoSwitchBackend # isort: skip # noqa: E402
172172
173- if (
174- AutoSwitchBackend .get () is not AutoSwitchBackend .default
175- and AutoSwitchBackend .get_value_source () is not ValueSource .DEFAULT
176- ):
173+ if AutoSwitchBackend .get_value_source () is ValueSource .DEFAULT :
177174 AutoSwitchBackend .disable ()
178175
179176# Hybrid Mode Registration
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
3+ #
4+
5+
6+ def test_importing_plugin_always_turns_off_auto_switch_backend ():
7+ """Test that importing snowflake.snowpark.modin.plugin always turns AutoSwitchBackend off."""
8+
9+ from modin .config import AutoSwitchBackend
10+
11+ import snowflake .snowpark .modin .plugin # noqa: F401
12+
13+ assert AutoSwitchBackend .get () is False
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
3+ #
4+
5+
6+ def test_auto_switch_backend_user_sets_to_False ():
7+ """Test that importing snowflake.snowpark.modin.plugin does not override user's AutoSwitchBackend setting"""
8+
9+ from modin .config import AutoSwitchBackend
10+
11+ AutoSwitchBackend .disable ()
12+ assert AutoSwitchBackend .get () is False
13+
14+ import snowflake .snowpark .modin .plugin # noqa: F401
15+
16+ assert AutoSwitchBackend .get () is False
You can’t perform that action at this time.
0 commit comments