diff options
Diffstat (limited to 'osprofiler/tests/unit/test_profiler.py')
-rw-r--r-- | osprofiler/tests/unit/test_profiler.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/osprofiler/tests/unit/test_profiler.py b/osprofiler/tests/unit/test_profiler.py index 0f0fcb5..ec24046 100644 --- a/osprofiler/tests/unit/test_profiler.py +++ b/osprofiler/tests/unit/test_profiler.py @@ -19,7 +19,6 @@ import datetime import re from unittest import mock -import six from osprofiler import profiler from osprofiler.tests import test @@ -462,7 +461,6 @@ class TraceClsDecoratorTestCase(test.TestCase): # - and FakeTraceStatic.method4 in PY3 "name": "osprofiler.tests.unit.test_profiler" - ".method4" if six.PY2 else "osprofiler.tests.unit.test_profiler.FakeTraceStatic" ".method4", "args": str((25,)), @@ -490,8 +488,7 @@ class TraceClsDecoratorTestCase(test.TestCase): self.assertFalse(mock_stop.called) -@six.add_metaclass(profiler.TracedMeta) -class FakeTraceWithMetaclassBase(object): +class FakeTraceWithMetaclassBase(object, metaclass=profiler.TracedMeta): __trace_args__ = {"name": "rpc", "info": {"a": 10}} @@ -534,8 +531,8 @@ class TraceWithMetaclassTestCase(test.TestCase): def test_no_name_exception(self): def define_class_with_no_name(): - @six.add_metaclass(profiler.TracedMeta) - class FakeTraceWithMetaclassNoName(FakeTracedCls): + class FakeTraceWithMetaclassNoName(FakeTracedCls, + metaclass=profiler.TracedMeta): pass self.assertRaises(TypeError, define_class_with_no_name, 1) |