diff --git a/doc/customize.txt b/doc/customize.txt index ee06e465b..1e80c7add 100644 --- a/doc/customize.txt +++ b/doc/customize.txt @@ -319,24 +319,14 @@ Collection nodes which have children are called "Collectors" and otherwise they are called "Items" or "test items". Here is an example of such a tree:: - testing $ py.test --collectonly test_parseonly.py - - - + example $ py.test --collectonly test_collectonly.py + + + + - - - - - - - - - - - - - + + By default all directories not starting with a dot are traversed, looking for ``test_*.py`` and ``*_test.py`` files. Those Python diff --git a/doc/doctest.txt b/doc/doctest.txt index cafa77aa1..44f283244 100644 --- a/doc/doctest.txt +++ b/doc/doctest.txt @@ -45,7 +45,7 @@ then you can just invoke ``py.test`` without command line options:: $ py.test ============================= test session starts ============================== platform linux2 -- Python 2.6.5 -- pytest-2.0.0dev0 - test path 1: /tmp/doc-exec-109 + test path 1: /tmp/doc-exec-224 conftest.py . example.rst . diff --git a/doc/example/test_collectonly.py b/doc/example/test_collectonly.py new file mode 100644 index 000000000..1e3ed131d --- /dev/null +++ b/doc/example/test_collectonly.py @@ -0,0 +1,11 @@ + +# run this with $ py.test --collectonly test_collectonly.py +# +def test_function(): + pass + +class TestClass: + def test_method(): + pass + def test_anothermethod(): + pass diff --git a/doc/monkeypatch.txt b/doc/monkeypatch.txt index 8bb8eea00..59f8dc725 100644 --- a/doc/monkeypatch.txt +++ b/doc/monkeypatch.txt @@ -40,7 +40,7 @@ will be undone. $ py.test ============================= test session starts ============================== platform linux2 -- Python 2.6.5 -- pytest-2.0.0dev0 - test path 1: /tmp/doc-exec-117 + test path 1: /tmp/doc-exec-232 =============================== in 0.00 seconds ===============================