From 43e368a7349988f28e8fe0b1747d54c715015355 Mon Sep 17 00:00:00 2001 From: felinae98 <731499577@qq.com> Date: Mon, 14 Nov 2022 17:15:17 +0800 Subject: [PATCH] chore: skip pic merge test (#141) --- .github/workflows/main.yml | 2 +- pyproject.toml | 3 ++- tests/test_merge_pic.py | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ec53a7..6f617df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: run: poetry install - name: Run Pytest - run: poetry run pytest --cov-report xml --cov=./src/plugins/nonebot_bison -k 'not compare and not render' + run: poetry run pytest --cov-report xml --cov=./src/plugins/nonebot_bison -k 'not compare and not render and not external' - name: Upload coverage report uses: codecov/codecov-action@v3 diff --git a/pyproject.toml b/pyproject.toml index cd93d97..6490b4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,8 @@ build-backend = "poetry.masonry.api" [tool.pytest.ini_options] markers = [ "compare: compare fetching result with rsshub", - "render: render img by chrome" + "render: render img by chrome", + "external: use external resources" ] asyncio_mode = "auto" diff --git a/tests/test_merge_pic.py b/tests/test_merge_pic.py index 09b7a95..e223d51 100644 --- a/tests/test_merge_pic.py +++ b/tests/test_merge_pic.py @@ -41,6 +41,7 @@ merge_source_9_2 = [ ] +@pytest.mark.external @flaky async def test_9_merge(app: App): from nonebot_bison.post import Post @@ -51,6 +52,7 @@ async def test_9_merge(app: App): await post.generate_messages() +@pytest.mark.external @flaky async def test_9_merge_2(app: App): from nonebot_bison.post import Post @@ -61,6 +63,7 @@ async def test_9_merge_2(app: App): await post.generate_messages() +@pytest.mark.external @flaky async def test_6_merge(app: App): from nonebot_bison.post import Post @@ -70,6 +73,7 @@ async def test_6_merge(app: App): assert len(post.pics) == 5 +@pytest.mark.external @flaky async def test_3_merge(app: App): from nonebot_bison.post import Post @@ -79,6 +83,7 @@ async def test_3_merge(app: App): assert len(post.pics) == 5 +@pytest.mark.external @flaky async def test_6_merge_only(app: App): from nonebot_bison.post import Post @@ -88,6 +93,7 @@ async def test_6_merge_only(app: App): assert len(post.pics) == 1 +@pytest.mark.external @flaky async def test_3_merge_only(app: App): from nonebot_bison.post import Post