Skip to content

Commit f5a98dd

Browse files
committed
Add test
1 parent d8fffe9 commit f5a98dd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/unit/test_estimator.py

+18
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,24 @@ def test_framework_all_init_args(sagemaker_session):
512512
}
513513

514514

515+
def test_subnets_without_security_groups(sagemaker_session):
516+
with pytest.raises(RuntimeError):
517+
DummyFramework(
518+
entry_point=SCRIPT_PATH,
519+
sagemaker_session=sagemaker_session,
520+
subnets=['123'],
521+
)
522+
523+
524+
def test_security_groups_without_subnets(sagemaker_session):
525+
with pytest.raises(RuntimeError):
526+
DummyFramework(
527+
entry_point=SCRIPT_PATH,
528+
sagemaker_session=sagemaker_session,
529+
security_group_ids=['123'],
530+
)
531+
532+
515533
def test_framework_without_role_parameter(sagemaker_session):
516534
with pytest.raises(ValueError):
517535
DummyFramework(

0 commit comments

Comments
 (0)