Skip to content

Commit

Permalink
test: 修复没有正确 mock 导致 Actions 运行测试时会输出作业摘要的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Dec 12, 2024
1 parent ce7fdc7 commit 5085250
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def load_plugin(nonebug_init: None) -> set["Plugin"]:


@pytest.fixture
async def app(app: App, tmp_path: Path, mocker: MockerFixture):
async def app(
app: App, tmp_path: Path, mocker: MockerFixture, monkeypatch: pytest.MonkeyPatch
):
from src.plugins.github import plugin_config
from src.providers.utils import dump_json5

Expand Down Expand Up @@ -98,6 +100,7 @@ async def app(app: App, tmp_path: Path, mocker: MockerFixture):
mocker.patch.object(
plugin_config, "github_step_summary", tmp_path / "step_summary.txt"
)
monkeypatch.setenv("GITHUB_STEP_SUMMARY", str(tmp_path / "step_summary.md"))

yield app

Expand Down

0 comments on commit 5085250

Please sign in to comment.