From 2f9e099c183872364931477127895ffa485dc190 Mon Sep 17 00:00:00 2001 From: Aryaz Eghbali Date: Fri, 18 Oct 2024 08:08:48 +0200 Subject: [PATCH] Added test --- tests/trace_single_hook/list/analysis.py | 6 ++++++ tests/trace_single_hook/list/expected.txt | 2 ++ tests/trace_single_hook/list/program.py | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 tests/trace_single_hook/list/analysis.py create mode 100644 tests/trace_single_hook/list/expected.txt create mode 100644 tests/trace_single_hook/list/program.py diff --git a/tests/trace_single_hook/list/analysis.py b/tests/trace_single_hook/list/analysis.py new file mode 100644 index 0000000..bf082bb --- /dev/null +++ b/tests/trace_single_hook/list/analysis.py @@ -0,0 +1,6 @@ +from dynapyt.analyses.BaseAnalysis import BaseAnalysis + + +class TestAnalysis(BaseAnalysis): + def _list(self, dyn_ast, iid, value): + print("List") diff --git a/tests/trace_single_hook/list/expected.txt b/tests/trace_single_hook/list/expected.txt new file mode 100644 index 0000000..61e1680 --- /dev/null +++ b/tests/trace_single_hook/list/expected.txt @@ -0,0 +1,2 @@ +List +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18] \ No newline at end of file diff --git a/tests/trace_single_hook/list/program.py b/tests/trace_single_hook/list/program.py new file mode 100644 index 0000000..54dcf73 --- /dev/null +++ b/tests/trace_single_hook/list/program.py @@ -0,0 +1,2 @@ +l = [i * 2 for i in range(10)] +print(l)