From bb1e02af1e1e0e3257f07d3e6089c82764ff4f02 Mon Sep 17 00:00:00 2001 From: StellarisW Date: Fri, 29 Nov 2024 13:19:45 +0800 Subject: [PATCH] fix: sub module conflict error --- tests/test_parser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_parser.py b/tests/test_parser.py index 12ee021..ea810dd 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -36,8 +36,12 @@ def test_constants(): def test_include(): thrift = load('parser-cases/include.thrift', include_dirs=[ - './parser-cases']) + './parser-cases'], module_name='include_thrift') assert thrift.datetime == 1422009523 + assert sys.modules['include_thrift'] is not None + assert sys.modules['included_thrift'] is not None + assert sys.modules['include.included_1_thrift'] is not None + assert sys.modules['include.included_2_thrift'] is not None def test_include_with_module_name_prefix():