From e7301d7389fac744598400ccd3c9671292c8ece4 Mon Sep 17 00:00:00 2001 From: tgerdes Date: Fri, 24 Jul 2020 18:36:46 -0500 Subject: [PATCH] fix test --- qa/L0_function_stack/test_pyprof_func_stack.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qa/L0_function_stack/test_pyprof_func_stack.py b/qa/L0_function_stack/test_pyprof_func_stack.py index 30de937..3082d19 100755 --- a/qa/L0_function_stack/test_pyprof_func_stack.py +++ b/qa/L0_function_stack/test_pyprof_func_stack.py @@ -37,16 +37,19 @@ def tearDown(self): pass def compare_funcstack(self, actual_tracemarker, expected_str): - # Given a funcstack string, remove TestPyProfFuncStack::run and everything above it + # Given a funcstack string, remove TestPyProfFuncStack::__call__/run and everything above it # def remove_test_class_hierarchy(x): separator = "/" fn_split = x.split(separator) + split = 0 + # Find the LAST instance of run in the split + # for i, n in enumerate(fn_split): if (n == "run"): - fn_split = fn_split[i+1:] - break + split = i+1 + fn_split = fn_split[split:] joined = separator.join(fn_split) return joined @@ -103,7 +106,7 @@ def test_ignore_class_call(self): def wrapper_func(): tracemarker = pyprof.nvtx.nvmarker.traceMarker("opname") - self.compare_funcstack(tracemarker,"test_ignore_class_call/func1/func2/func3/opname") + self.compare_funcstack(tracemarker,"test_ignore_class_call/func1/func2/ExecutableClass::__call__/func3/opname") def func3(): wrapper_func()