Skip to content

Commit 88ee686

Browse files
author
Bryannah Hernandez
committed
py310 and higher
1 parent a83664b commit 88ee686

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/unit/sagemaker/serve/test_app.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,22 @@
1313
from __future__ import absolute_import
1414

1515
import unittest
16+
import pytest
1617

1718
from unittest.mock import patch, Mock
1819
from sagemaker.serve.app import InProcessServer
20+
from tests.integ.sagemaker.serve.constants import (
21+
PYTHON_VERSION_IS_NOT_310,
22+
)
1923

2024
mock_model_id = "mock_model_id"
2125

2226

2327
class TestAppInProcessServer(unittest.TestCase):
28+
@pytest.mark.skipif(
29+
PYTHON_VERSION_IS_NOT_310,
30+
reason="The goal of these tests are to test the serving components of our feature",
31+
)
2432
@patch("sagemaker.serve.app.threading")
2533
@patch("sagemaker.serve.app.pipeline")
2634
def test_in_process_server_init(self, mock_pipeline, mock_threading):
@@ -30,6 +38,10 @@ def test_in_process_server_init(self, mock_pipeline, mock_threading):
3038
in_process_server = InProcessServer(model_id=mock_model_id)
3139
in_process_server._generator = mock_generator
3240

41+
@pytest.mark.skipif(
42+
PYTHON_VERSION_IS_NOT_310,
43+
reason="The goal of these test are to test the serving components of our feature",
44+
)
3345
@patch("sagemaker.serve.app.logger")
3446
@patch("sagemaker.serve.app.threading")
3547
@patch("sagemaker.serve.app.pipeline")
@@ -47,6 +59,10 @@ def test_start_server(self, mock_pipeline, mock_threading, mock_logger):
4759
mock_logger.info.assert_called()
4860
mock_thread.start.assert_called()
4961

62+
@pytest.mark.skipif(
63+
PYTHON_VERSION_IS_NOT_310,
64+
reason="The goal of these test are to test the serving components of our feature",
65+
)
5066
@patch("sagemaker.serve.app.asyncio")
5167
@patch("sagemaker.serve.app.pipeline")
5268
def test_start_run_async_in_thread(self, mock_pipeline, mock_asyncio):

0 commit comments

Comments
 (0)