Skip to content

Commit

Permalink
Make comments in tests consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
johananl committed Oct 9, 2019
1 parent ffe9860 commit 62cda93
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions opentracing-shim/tests/test_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ def test_start_active_span(self):
self.assertIsInstance(scope, opentracing.Scope)
self.assertIsInstance(scope.span, opentracing.Span)

# Verify the span is started.
# Verify span is started.
self.assertIsNotNone(scope.span.unwrap().start_time)

# Verify the span is active.
# Verify span is active.
self.assertEqual(self.shim.active_span.context, scope.span.context)
# TODO: We can't check for equality of self.shim.active_span and
# scope.span because the same OpenTelemetry span is returned inside
# different SpanWrapper objects. A possible solution is described
# here:
# https://github.com/open-telemetry/opentelemetry-python/issues/161#issuecomment-534136274

# Verify the span has ended.
# Verify span has ended.
self.assertIsNotNone(scope.span.unwrap().end_time)

# Verify no span is active.
Expand All @@ -77,21 +77,21 @@ def test_start_span(self):
# Verify correct type of Span object.
self.assertIsInstance(span, opentracing.Span)

# Verify the span is started.
# Verify span is started.
self.assertIsNotNone(span.unwrap().start_time)

# Verify `start_span()` does NOT make the span active.
self.assertIsNone(self.shim.active_span)

# Verify the span has ended.
# Verify span has ended.
self.assertIsNotNone(span.unwrap().end_time)

def test_start_span_no_contextmanager(self):
"""Test `start_span()` without a `with` statement."""

span = self.shim.start_span("TestSpan")

# Verify the span is started.
# Verify span is started.
self.assertIsNotNone(span.unwrap().start_time)

# Verify `start_span()` does NOT make the span active.
Expand All @@ -109,7 +109,7 @@ def test_explicit_span_finish(self):

span.finish()

# Verify the span has ended.
# Verify span has ended.
self.assertIsNotNone(span.unwrap().end_time)

def test_explicit_start_time(self):
Expand Down

0 comments on commit 62cda93

Please sign in to comment.