From e6d742237b82b85e51cf3be8f0cd53e46be5a49c Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Tue, 11 Jun 2024 23:11:02 -0700 Subject: [PATCH] Update tests for cleanup --- tests/test_basic.py | 4 ++-- tests/test_performance.py | 6 +++--- tests/test_regression.py | 2 +- tests/test_tracer.py | 4 ++-- tests/test_vizobject.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index 8f3e355c..12ba4281 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -49,7 +49,7 @@ def fun(n): t.parse() self.assertEventNumber(t.data, 21) - def test_cleanup(self): + def test_clear(self): def fib(n): if n == 1 or n == 0: return 1 @@ -59,7 +59,7 @@ def fib(n): t.start() fib(5) t.stop() - t.cleanup() + t.clear() t.parse() self.assertEventNumber(t.data, 0) diff --git a/tests/test_performance.py b/tests/test_performance.py index 8262b298..098c392a 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -228,7 +228,7 @@ def do_one_function(self, func): func() baseline = t.get_time() tracer.stop() - tracer.cleanup() + tracer.clear() tracer.include_files = ["/"] tracer.start() @@ -236,7 +236,7 @@ def do_one_function(self, func): func() include_files = t.get_time() tracer.stop() - tracer.cleanup() + tracer.clear() tracer.include_files = [] tracer.max_stack_depth = 200 @@ -245,7 +245,7 @@ def do_one_function(self, func): func() max_stack_depth = t.get_time() tracer.stop() - tracer.cleanup() + tracer.clear() logging.info("Filter performance:") logging.info(f"Baseline: {baseline:.9f}(1)") diff --git a/tests/test_regression.py b/tests/test_regression.py index f44f2c79..2523ed7b 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -72,7 +72,7 @@ def test_cleanup(self): except Exception: pass tracer.stop() - tracer.cleanup() + tracer.clear() class TestFunctionArg(BaseTmpl): diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 45a0591e..97e03dce 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -62,9 +62,9 @@ def test_c_cleanup(self): tracer.start() fib(5) tracer.stop() - tracer.cleanup() tracer.clear() - tracer.cleanup() + tracer.clear() + tracer.clear() class TestCircularBuffer(BaseTmpl): diff --git a/tests/test_vizobject.py b/tests/test_vizobject.py index e38bd42a..19d293d7 100644 --- a/tests/test_vizobject.py +++ b/tests/test_vizobject.py @@ -61,7 +61,7 @@ def test_exclude(self): def test_trigger_on_change(self): tracer = VizTracer(verbose=0) tracer.stop() - tracer.cleanup() + tracer.clear() tracer.start() a = VizObject(tracer, "my variable", trigger_on_change=False) a.hello = 1