assert 文によるアサーション¶ py.test は、テストで期待値と実際の値を検証するのに Python 標準の assert 文が使えます。例えば、次のようにテストを作成します: $ py.test test_assert1.py =========================== test session starts ============================ platform linux2 -- Python 2.7.1 -- pytest-2.2.4 collecting ... collected 1 items test_assert1.py F ================================= FAILURES ================================= ___________________________