diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index affa4bd57c7..df1fefe7a32 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -556,6 +556,7 @@ RUN(NAME test_import_04 IMPORT_PATH .. LABELS cpython llvm c) RUN(NAME test_import_05 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME test_import_06 LABELS cpython llvm) +RUN(NAME test_import_07 LABELS cpython llvm c) RUN(NAME test_math LABELS cpython llvm NOFAST) RUN(NAME test_numpy_01 LABELS cpython llvm c) RUN(NAME test_numpy_02 LABELS cpython llvm c) diff --git a/integration_tests/test_import_07.py b/integration_tests/test_import_07.py new file mode 100644 index 00000000000..b799410cbf0 --- /dev/null +++ b/integration_tests/test_import_07.py @@ -0,0 +1,8 @@ +# test issue 2153 +from test_import_07_module import f as fa + +def main0(): + assert fa(3) == 6 + assert fa(10) == 20 + +main0() diff --git a/integration_tests/test_import_07_module.py b/integration_tests/test_import_07_module.py new file mode 100644 index 00000000000..a0925aa5ae9 --- /dev/null +++ b/integration_tests/test_import_07_module.py @@ -0,0 +1,4 @@ +from lpython import i32 + +def f(x: i32) -> i32: + return 2 * x