From 2e255fee6c9ba33cf9443ddc5dff61ccef02e723 Mon Sep 17 00:00:00 2001 From: advik Date: Fri, 19 Apr 2024 10:38:21 +0530 Subject: [PATCH] Fix tests for C backend --- integration_tests/test_list_11.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/integration_tests/test_list_11.py b/integration_tests/test_list_11.py index 132d1c23f1..2cb899ebf2 100644 --- a/integration_tests/test_list_11.py +++ b/integration_tests/test_list_11.py @@ -1,5 +1,12 @@ from lpython import i32 +l: list[i32] = [1, 2] + +def add_item(i: i32) -> list[i32]: + l.append(i) + return l + + def return_empty_list_of_tuples() -> list[i32]: return [] @@ -20,12 +27,6 @@ def test_iterate_over_string(): i+=1 def test_issue_2639(): - l: list[i32] = [1, 2] - - def add_item(i: i32) -> list[i32]: - l.append(i) - return l - print(add_item(3)) assert len(l) == 3