-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +0,0 @@ | ||
import pytest | ||
|
||
|
||
class MyTest: | ||
@pytest.fixture(autouse=True) | ||
def load_pixivbot(self, nonebug_init): | ||
import nonebot # 这里的导入必须在函数内 | ||
|
||
# 加载插件 | ||
return nonebot.load_plugins("nonebot_plugin_mahjong_scoreboard") | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import nonebot | ||
import pytest | ||
from nonebot.adapters.onebot.v11 import Adapter | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def load_bot(): | ||
# 加载适配器 | ||
driver = nonebot.get_driver() | ||
driver.register_adapter(Adapter) | ||
|
||
# 加载插件 | ||
nonebot.load_plugin("nonebot_plugin_mahjong_scoreboard") |