Skip to content

Commit

Permalink
Deal with mock.Mock false positives failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odeke-em committed Nov 14, 2024
1 parent 42b9a4c commit 6c8bb88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/_opentelemetry_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def trace_call(name, session, extra_attributes=None, observability_options=None)
# on by default.
enable_extended_tracing = True

if observability_options:
if type(observability_options) == dict: # Avoid false positives with mock.Mock
tracer_provider = observability_options.get("tracer_provider", None)
enable_extended_tracing = observability_options.get(
"enable_extended_tracing", enable_extended_tracing
Expand Down

0 comments on commit 6c8bb88

Please sign in to comment.