def test_on_create(self):
    from opencensus.trace.blank_span import BlankSpan
    self.on_create_called = False
    self._make_one('span1')
    self.assertFalse(self.on_create_called)
    try:

        @BlankSpan.on_create
        def callback(span):
            self.on_create_called = True
        self._make_one('span2')
    finally:
        BlankSpan._on_create_callbacks = []
    self.assertFalse(self.on_create_called)
def test_on_create(self):
    from opencensus.trace.blank_span import BlankSpan
    self.on_create_called = False
    self._make_one('span1')
    self.assertFalse(self.on_create_called)
    try:

        @BlankSpan.on_create
        def callback(span):
            self.on_create_called = True
        self._make_one('span2')
    finally:
        BlankSpan._on_create_callbacks = []
    self.assertFalse(self.on_create_called)