From 7f71394309d478791ef8984e827efaf370dc70e6 Mon Sep 17 00:00:00 2001 From: joncrall Date: Sun, 28 Apr 2024 00:24:15 -0400 Subject: [PATCH] Fix test --- tests/test_line_profiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_line_profiler.py b/tests/test_line_profiler.py index 25896c0c..808d6e24 100644 --- a/tests/test_line_profiler.py +++ b/tests/test_line_profiler.py @@ -119,7 +119,8 @@ def test_show_func_column_formatting(): def get_func_linenos(func): import sys if sys.version_info[0:2] >= (3, 10): - return sorted(set([t[2] for t in func.__code__.co_lines()])) + return sorted(set([t[0] if t[2] is None else t[2] + for t in func.__code__.co_lines()])) else: import dis return sorted(set([t[1] for t in dis.findlinestarts(func.__code__)]))