add changelog entry for anthon's hynek-fication of options,
and change the docs and tests to use the new style.
This commit is contained in:
@@ -101,7 +101,7 @@ Yaml ファイルでテストを指定する基本的なサンプル
|
||||
|
||||
カスタムテストコレクションや実行処理の開発中、そのコレクションツリーをちょっと見るのもおもしろいです::
|
||||
|
||||
nonpython $ py.test --collectonly
|
||||
nonpython $ py.test --collect-only
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 2 items
|
||||
|
||||
@@ -218,7 +218,7 @@ Robert Collins による標準ライブラリの unittest フレームワーク
|
||||
|
||||
ただテストを (実行せずに) 集めるだけなら、テスト関数の変数として 'advanced' と 'basic' もうまく表示されます::
|
||||
|
||||
$ py.test --collectonly test_scenarios.py
|
||||
$ py.test --collect-only test_scenarios.py
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 2 items
|
||||
@@ -287,7 +287,7 @@ Robert Collins による標準ライブラリの unittest フレームワーク
|
||||
|
||||
コレクション時に先ほどの設定がどうなるかを最初に見てみましょう::
|
||||
|
||||
$ py.test test_backends.py --collectonly
|
||||
$ py.test test_backends.py --collect-only
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 2 items
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
# run this with $ py.test --collectonly test_collectonly.py
|
||||
# run this with $ py.test --collect-only test_collectonly.py
|
||||
#
|
||||
def test_function():
|
||||
pass
|
||||
|
||||
@@ -68,7 +68,7 @@ ini ファイルで :confval:`norecursedirs` オプションを設定できま
|
||||
|
||||
テストコレクションは次のようになります::
|
||||
|
||||
$ py.test --collectonly
|
||||
$ py.test --collect-only
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 2 items
|
||||
@@ -127,7 +127,7 @@ py.test がファイルシステムのパスから Python パッケージ名と
|
||||
|
||||
次のようにテストを実行せずにコレクションツリーをピークできます::
|
||||
|
||||
. $ py.test --collectonly pythoncollection.py
|
||||
. $ py.test --collect-only pythoncollection.py
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 3 items
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ funcarg ファクトリー関数は、特別なテスト関数呼び出しに関
|
||||
|
||||
分かりやすいように ``numiter`` の値が ``9`` のときのみテストが失敗します。 ``pytest_generate_tests(metafunc)`` フックは、実際にテストを実行するときとは違うフェーズの、テストコレクションで呼ばれることに注意してください。では、テストコレクションがどうなるかをちょっと見てみましょう::
|
||||
|
||||
$ py.test --collectonly test_example.py
|
||||
$ py.test --collect-only test_example.py
|
||||
=========================== test session starts ============================
|
||||
platform linux2 -- Python 2.7.1 -- pytest-2.2.4
|
||||
collecting ... collected 10 items
|
||||
|
||||
Reference in New Issue
Block a user