Skip to content

Commit 100289c

Browse files
committed
TEST: Add test for issue #2032
1 parent 0a4e686 commit 100289c

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ RUN(NAME test_import_03 LABELS cpython llvm c)
483483
RUN(NAME test_import_04 IMPORT_PATH ..
484484
LABELS cpython llvm c)
485485
RUN(NAME test_import_05 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
486+
RUN(NAME test_import_06 LABELS cpython llvm)
486487
RUN(NAME test_math LABELS cpython llvm NOFAST)
487488
RUN(NAME test_numpy_01 LABELS cpython llvm c)
488489
RUN(NAME test_numpy_02 LABELS cpython llvm c)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from test_import_06_mod1 import StringIO
2+
from test_import_06_mod2 import stringio_test
3+
4+
if __name__ == '__main__':
5+
integer_asr : str = '(Integer 4 [])'
6+
fd : StringIO = StringIO(integer_asr)
7+
stringio_test(fd, integer_asr)
8+
print("Ok")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from lpython import dataclass
2+
3+
@dataclass
4+
class StringIO:
5+
a: str
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from test_import_06_mod1 import StringIO
2+
3+
def stringio_test(fd: StringIO, integer_asr: str):
4+
assert fd.a == integer_asr

0 commit comments

Comments
 (0)