Skip to content

Commit 1a7dd7c

Browse files
Ao GuoNamrata Madan
authored andcommitted
Enable some existing integ tests
1 parent 091f6c6 commit 1a7dd7c

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

requirements/extras/test_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ Jinja2==3.0.3
2222
pandas>=1.3.5,<1.5
2323
scikit-learn==1.0.2
2424
cloudpickle==2.2.0
25-
tblib==1.7.0

tests/integ/sagemaker/remote_function/test_decorator.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import os
1818

1919
from sagemaker.remote_function import remote
20+
from sagemaker.remote_function.errors import RuntimeEnvironmentError
2021

2122
from tests.integ.kms_utils import get_or_create_kms_key
2223
from tests.integ import DATA_DIR
23-
from sagemaker.exceptions import UnexpectedStatusException
2424

2525
ROLE = "SageMakerRole"
2626

@@ -45,7 +45,6 @@ def divide(x, y):
4545
assert divide(20, 2) == 10
4646

4747

48-
@pytest.mark.skip
4948
def test_decorated_function_raises_exception(
5049
sagemaker_session, dummy_container_without_error, cpu_instance_type
5150
):
@@ -133,11 +132,7 @@ def test_with_non_existent_dependencies(
133132
def divide(x, y):
134133
return x / y
135134

136-
# TODO: this should raise RuntimeEnvironmentError
137-
# Currently this is returning UnexpectedStatusException due to how `job.wait()` is implemented
138-
# in remote_function's client. We are correctly throwing RuntimeEnvironmentError from
139-
# Runtime env module
140-
with pytest.raises(UnexpectedStatusException):
135+
with pytest.raises(RuntimeEnvironmentError):
141136
divide(10, 2)
142137

143138

0 commit comments

Comments
 (0)