Skip to content

Commit 3f7eec1

Browse files
try except for Span._get_links
1 parent c1cb26c commit 3f7eec1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/test_tracing.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,10 @@ def test_function(self):
10911091
self.assertEqual(span.get_tag("function_version"), "$LATEST")
10921092
self.assertEqual(span.get_tag("resource_names"), "Function")
10931093
self.assertEqual(span.get_tag("functionname"), "function")
1094-
self.assertEqual(Span._get_links(span), [])
1094+
try:
1095+
self.assertEqual(Span._get_links(span), [])
1096+
except:
1097+
self.assertEqual(span._links, [])
10951098

10961099
def test_function_with_version(self):
10971100
function_version = "1"
@@ -1172,7 +1175,10 @@ def test_function_with_span_pointers(self):
11721175
),
11731176
],
11741177
)
1175-
actual_links = Span._get_links(span)
1178+
try:
1179+
actual_links = Span._get_links(span)
1180+
except:
1181+
actual_links = span._links
11761182
expected_links = [
11771183
_expected_span_pointer_link(
11781184
"some.kind",

0 commit comments

Comments
 (0)