Skip to content

CIで実行しないテストを、Pytestのmarkers機能で指定する #680

@yuji38kwmt

Description

@yuji38kwmt

現状

CIで実行するテストは(WebAPIにアクセスしないテスト)は、ファイル名がtest_local*.pyのものに限定しています。

poetry run pytest tests/test_local*.py

この方法だと、テスト用のファイルにWebAPIに関係しないテストメソッドがあっても、このテストメソッドをCIで実行することができません。

やりたいこと

Pytestのmarkers機能を使って、CIで実行しないテストを指定できるようにしたいです。

poetry run pytest -n auto -m "not access_webapi"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions