Skip to content

本家のcoreにあるassetionのうち未実装で、既存実装と同様なものを追加する #1

@ftnext

Description

@ftnext

このリポジトリは uzabase/playtest2 のPythonポートです。
このissueではcoreモジュールにassertionを追加します

現在実装しているassertions

  • 文字列のである
    • @step("文字列の<expected>である")
      def assert_string_value(expected: str):
      actual = data_store.spec.pop("actual")
      assert actual == expected, f"Expected {expected!r} but got {actual!r}" # noqa: S101
  • 整数値のである
    • @step("整数値の<expected>である")
      def assert_int_value(expected: str):
      actual = data_store.spec.pop("actual")
      expected = int(expected)
      assert actual == expected, f"Expected {expected!r} but got {actual!r}" # noqa: S101
  • 真である

追加で実装するassertions

「文字列のである」に近い実装

  • 文字列のを含んでいる

「整数値のである」に近い実装

  • 小数値のである
  • 整数値の以上である

「真である」に近い実装

  • 偽である
  • 真偽値のである
  • nullである

進め方の指定

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions