33import time
44
55
6- class OTSpanTest :
7- def setUp ():
6+ class TestOTSpan :
7+ def setUp (self ):
88 """ Clear all spans before a test run """
99 recorder = opentracing .global_tracer .recorder
1010 recorder .clear_spans ()
1111
12- def tearDown ():
12+ def tearDown (self ):
1313 """ Do nothing for now """
1414 return None
1515
16- def test_span_interface ():
16+ def test_span_interface (self ):
1717 span = opentracing .global_tracer .start_span ("blah" )
1818 assert hasattr (span , "finish" )
1919 assert hasattr (span , "set_tag" )
@@ -24,7 +24,7 @@ def test_span_interface():
2424 assert hasattr (span , "context" )
2525 assert hasattr (span , "log" )
2626
27- def test_span_ids ():
27+ def test_span_ids (self ):
2828 count = 0
2929 while count <= 1000 :
3030 count += 1
@@ -33,7 +33,7 @@ def test_span_ids():
3333 assert - 9223372036854775808 <= context .span_id <= 9223372036854775807
3434 assert - 9223372036854775808 <= context .trace_id <= 9223372036854775807
3535
36- def test_span_fields ():
36+ def test_span_fields (self ):
3737 span = opentracing .global_tracer .start_span ("mycustom" )
3838 assert_equals ("mycustom" , span .operation_name )
3939 assert span .context
@@ -44,7 +44,7 @@ def test_span_fields():
4444 assert_equals ("string" , span .tags ['tagone' ])
4545 assert_equals (150 , span .tags ['tagtwo' ])
4646
47- def test_span_queueing ():
47+ def test_span_queueing (self ):
4848 recorder = opentracing .global_tracer .recorder
4949
5050 count = 1
@@ -57,7 +57,7 @@ def test_span_queueing():
5757
5858 assert_equals (20 , recorder .queue_size ())
5959
60- def test_sdk_spans ():
60+ def test_sdk_spans (self ):
6161 recorder = opentracing .global_tracer .recorder
6262
6363 span = opentracing .global_tracer .start_span ("custom_sdk_span" )
0 commit comments