File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -165,18 +165,18 @@ def test_sklearn_with_all_parameters(
165
165
sagemaker_session .process .assert_called_with (** expected_args )
166
166
167
167
168
-
169
- def test_local_mode_disables_local_code_by_default (sklearn_latest_version ):
170
- processor = SKLearnProcessor (
171
- framework_version = sklearn_latest_version ,
168
+ @ patch ( "sagemaker.local.LocalSession.__init__" , return_value = None )
169
+ def test_local_mode_disables_local_code_by_default (localsession_mock ):
170
+ Processor (
171
+ image_uri = "" ,
172
172
role = ROLE ,
173
173
instance_count = 1 ,
174
174
instance_type = "local" ,
175
175
)
176
176
177
177
# Most tests use a fixture for sagemaker_session for consistent behaviour, so this unit test
178
178
# checks that the default initialization disables unsupported 'local_code' mode:
179
- assert not get_config_value ( "local.local_code" , processor . sagemaker_session . config )
179
+ localsession_mock . assert_called_with ( disable_local_code = True )
180
180
181
181
182
182
@patch ("sagemaker.utils._botocore_resolver" )
You can’t perform that action at this time.
0 commit comments