Skip to content

Commit 9a85209

Browse files
authored
fix: skip SAR tests if python version > 3.10 (#3379)
1 parent 9074ad0 commit 9a85209

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/plugins/application/test_serverless_app_plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import sys
12
from unittest import TestCase
23
from unittest.mock import Mock, patch
34

45
import boto3
6+
import pytest
57
from botocore.exceptions import ClientError
68
from samtranslator.model.exceptions import InvalidResourceException
79
from samtranslator.plugins.application.serverless_app_plugin import ServerlessAppPlugin
@@ -51,6 +53,7 @@ def mock_get_region(self, service_name, region_name):
5153
return "us-east-1"
5254

5355

56+
@pytest.mark.skipif(sys.version_info > (3, 10), reason="Test fails for python versions >3.10")
5457
class TestServerlessAppPlugin_init(TestCase):
5558
def setUp(self):
5659
client = boto3.client("serverlessrepo", region_name="us-east-1")
@@ -115,6 +118,7 @@ def test_not_used_when_sar_client_provided(self):
115118
self.client_mock.assert_not_called()
116119

117120

121+
@pytest.mark.skipif(sys.version_info > (3, 10), reason="Test fails for python versions >3.10")
118122
class TestServerlessAppPlugin_on_before_transform_template_translate(TestCase):
119123
def setUp(self):
120124
client = boto3.client("serverlessrepo", region_name="us-east-1")

0 commit comments

Comments
 (0)