Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin_test): 修复 NoneBot 2.3.0 添加的 HTTP 客户端会话支持导致测试失败的问题 #218

Merged
merged 1 commit into from
May 2, 2024

Conversation

shoucandanghehe
Copy link
Contributor

@shoucandanghehe shoucandanghehe commented May 1, 2024

由于 NoneBot 2.3.0HTTPClientMixin 基类新增了抽象方法 get_session,所以现有的 fake driver 会导致启动混合驱动类时报错

    05-01 20:02:48 [SUCCESS] nonebot | NoneBot is initializing...
    05-01 20:02:48 [INFO] nonebot | Current Env: prod
    Traceback (most recent call last):
      File "/home/runner/work/registry/registry/plugin_test/nonebot-plugin-tetris-stats-nonebot_plugin_tetris_stats-test/runner.py", line 15, in <module>
        init()
      File "/home/runner/work/registry/registry/plugin_test/nonebot-plugin-tetris-stats-nonebot_plugin_tetris_stats-test/.venv/lib/python3.10/site-packages/nonebot/__init__.py", line 319, in init
        _driver = DriverClass(env, config)
    TypeError: Can't instantiate abstract class Driver with abstract method get_session

Copy link
Member

@he0119 he0119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好好好

@he0119 he0119 enabled auto-merge (squash) May 2, 2024 00:44
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (fe97955) to head (5837d88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files          17       17           
  Lines         966      966           
=======================================
  Hits          948      948           
  Misses         18       18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@he0119 he0119 merged commit f9b7f01 into nonebot:main May 2, 2024
7 checks passed
@shoucandanghehe shoucandanghehe deleted the fix-test-fail branch May 2, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants