Skip to content

Commit c707c5f

Browse files
committed
Fall back to cdk v2 before skipping cdk tests
1 parent 7e3b246 commit c707c5f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/functional/cdk/test_construct.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010

1111
try:
1212
from aws_cdk import core as cdk
13-
except Exception:
14-
pytestmark = pytest.mark.skip(
15-
"aws_cdk package needed to run CDK tests.")
13+
except ImportError:
14+
try:
15+
import aws_cdk as cdk
16+
except ImportError:
17+
pytestmark = pytest.mark.skip(
18+
"aws_cdk package needed to run CDK tests.")
1619

1720

1821
@pytest.fixture

0 commit comments

Comments
 (0)