Skip to content

Commit

Permalink
style: 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
test committed Oct 12, 2024
1 parent 0c056b2 commit 18b0940
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def load_plugin(nonebug_init: None) -> set["Plugin"]:
)


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

Expand Down Expand Up @@ -117,7 +117,7 @@ def _clear_cache(app: App):
check_url.cache_clear()


@pytest.fixture
@pytest.fixture()
def mocked_api(respx_mock: MockRouter):
respx_mock.get("exception", name="exception").mock(side_effect=httpx.ConnectError)
respx_mock.get(
Expand Down
2 changes: 1 addition & 1 deletion tests/github/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pytest_mock import MockerFixture


@pytest.fixture
@pytest.fixture()
def mock_installation(mocker: MockerFixture):
mock_installation = mocker.MagicMock()
mock_installation.id = 123
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def check_json_data(file: Path, data: Any) -> None:
assert json.load(f) == data


@pytest.fixture
@pytest.fixture()
def mock_pull(mocker: MockerFixture):
mock_pull = mocker.MagicMock()
mock_pull.head.ref = "publish/issue1"
Expand Down
1 change: 0 additions & 1 deletion tests/github/remove/process/test_remove_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pathlib import Path
from inline_snapshot import snapshot
from nonebug import App
import pytest
from pytest_mock import MockerFixture
from respx import MockRouter

Expand Down
2 changes: 0 additions & 2 deletions tests/github/remove/process/test_remove_pull_request.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from pathlib import Path
from unittest.mock import MagicMock

from inline_snapshot import snapshot
from nonebot.adapters.github import Adapter, PullRequestClosed
from nonebug import App
import pytest
from pytest_mock import MockerFixture

from tests.github.utils import MockIssue, generate_issue_body_remove, get_github_bot
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/store_test/test_store_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def load_json(name: str) -> dict:
return json.load(f)


@pytest.fixture
@pytest.fixture()
def mocked_store_data(
tmp_path: Path,
mocker: MockerFixture,
Expand Down
1 change: 0 additions & 1 deletion tests/utils/store_test/test_validate_plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import shutil
from datetime import datetime
from pathlib import Path

Expand Down

0 comments on commit 18b0940

Please sign in to comment.