def test_uninstrumented(self): PymemcacheInstrumentor().uninstrument() client = self.make_client( [b"STORED\r\n", b"VALUE key 0 5\r\nvalue\r\nEND\r\n"]) client.set(b"key", b"value", noreply=False) result = client.get(b"key") assert _str(result) == "value" spans = self.memory_exporter.get_finished_spans() self.assertEqual(len(spans), 0) PymemcacheInstrumentor().instrument()
def tearDown(self): super().tearDown() PymemcacheInstrumentor().uninstrument()
def setUp(self): super().setUp() PymemcacheInstrumentor().instrument() # pylint: disable=protected-access self.tracer = get_tracer(__name__)