diff options
| author | 2023-12-18 05:44:35 +0800 | |
|---|---|---|
| committer | 2023-12-18 05:44:35 +0800 | |
| commit | 477c9ccfe4451920838705ab4aba81b2b41d0c50 (patch) | |
| tree | 2ec905a48016480d2d95d269327cee1cb0c9dfbc /tests/TestRulePackage/tests.py | |
| parent | ed6a2c4001309096f191953d8986b54c006c518d (diff) | |
| download | infini-477c9ccfe4451920838705ab4aba81b2b41d0c50.tar.gz infini-477c9ccfe4451920838705ab4aba81b2b41d0c50.zip | |
fix(template|tests): update command: new template
Diffstat (limited to 'tests/TestRulePackage/tests.py')
| -rw-r--r-- | tests/TestRulePackage/tests.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/TestRulePackage/tests.py b/tests/TestRulePackage/tests.py index 37a6a301..af1726a0 100644 --- a/tests/TestRulePackage/tests.py +++ b/tests/TestRulePackage/tests.py @@ -1,10 +1,12 @@ from infini.matcher import matcher, MatcherEvent + def test(): - event = MatcherEvent("MyRule") + event = MatcherEvent("rule.example_handler", string="测试") try: - matcher.run(event) + result = matcher.run(event) + assert result == "捕获到输入: 测试" except Exception as error: - return [error] - finally: - return [] + return error + return [] + |
