Skip to content

Commit d2d3fff

Browse files
author
Nissan Pow
committed
fix: unit test KubernetesException import + skip conda on sfn-batch
- test_kubernetes.py imported KubernetesException from kube_utils but the decorator raises the one from kubernetes.py (different class) - Skip test_hello_conda on sfn-batch: conda env resolution during step-functions create not supported in CI localbatch setup
1 parent cf86360 commit d2d3fff

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/unit/test_kubernetes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import pytest
44

55
from metaflow.plugins.kubernetes.kube_utils import (
6-
KubernetesException,
6+
KubernetesException as KubeUtilsException,
77
validate_kube_labels,
88
parse_kube_keyvalue_list,
99
)
10+
from metaflow.plugins.kubernetes.kubernetes import KubernetesException
1011
from metaflow.plugins.kubernetes.kubernetes_decorator import KubernetesDecorator
1112

1213

@@ -70,7 +71,7 @@ def test_kubernetes_decorator_validate_kube_labels(labels):
7071
)
7172
def test_kubernetes_decorator_validate_kube_labels_fail(labels):
7273
"""Fail if label contains invalid characters or is too long"""
73-
with pytest.raises(KubernetesException):
74+
with pytest.raises(KubeUtilsException):
7475
validate_kube_labels(labels)
7576

7677

@@ -96,7 +97,7 @@ def test_kubernetes_parse_keyvalue_list(items, requires_both, expected):
9697
],
9798
)
9899
def test_kubernetes_parse_keyvalue_list(items, requires_both):
99-
with pytest.raises(KubernetesException):
100+
with pytest.raises(KubeUtilsException):
100101
parse_kube_keyvalue_list(items, requires_both)
101102

102103

0 commit comments

Comments
 (0)