From 7e37497d5a1fd2ee612e39980af5ac948367ecb9 Mon Sep 17 00:00:00 2001 From: Javi Romero Date: Fri, 22 Jul 2016 12:39:06 +0200 Subject: [PATCH] Uppercase first word in docstrings. Change to an imperative form. Add name to authors. --- AUTHORS | 1 + _pytest/capture.py | 4 ++-- _pytest/junitxml.py | 4 ++-- _pytest/monkeypatch.py | 6 +++--- _pytest/python.py | 2 +- _pytest/tmpdir.py | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/AUTHORS b/AUTHORS index c35e66587..b459cef6c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -96,3 +96,4 @@ Tom Viner Trevor Bekolay Wouter van Ackooy Bernard Pratz +Javier Romero diff --git a/_pytest/capture.py b/_pytest/capture.py index 3895a714a..2763c148c 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -156,7 +156,7 @@ error_capsysfderror = "cannot use capsys and capfd at the same time" @pytest.fixture def capsys(request): - """enables capturing of writes to sys.stdout/sys.stderr and makes + """Enable capturing of writes to sys.stdout/sys.stderr and make captured output available via ``capsys.readouterr()`` method calls which return a ``(out, err)`` tuple. """ @@ -167,7 +167,7 @@ def capsys(request): @pytest.fixture def capfd(request): - """enables capturing of writes to file descriptors 1 and 2 and makes + """Enable capturing of writes to file descriptors 1 and 2 and make captured output available via ``capfd.readouterr()`` method calls which return a ``(out, err)`` tuple. """ diff --git a/_pytest/junitxml.py b/_pytest/junitxml.py index f4de1343e..4c2b9d149 100644 --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -186,8 +186,8 @@ class _NodeReporter(object): @pytest.fixture def record_xml_property(request): - """Fixture that adds extra xml properties to the tag for the calling test. - The fixture is callable with (name, value), with value being automatically + """Add extra xml properties to the tag for the calling test. + The fixture is callable with ``(name, value)``, with value being automatically xml-encoded. """ request.node.warn( diff --git a/_pytest/monkeypatch.py b/_pytest/monkeypatch.py index d4c169d37..adf3427ce 100644 --- a/_pytest/monkeypatch.py +++ b/_pytest/monkeypatch.py @@ -9,7 +9,7 @@ RE_IMPORT_ERROR_NAME = re.compile("^No module named (.*)$") def pytest_funcarg__monkeypatch(request): - """The returned ``monkeypatch`` funcarg provides these + """Return a ``monkeypatch`` funcarg providing the following helper methods to modify objects, dictionaries or os.environ:: monkeypatch.setattr(obj, name, value, raising=True) @@ -220,10 +220,10 @@ class monkeypatch: """ Undo previous changes. This call consumes the undo stack. Calling it a second time has no effect unless you do more monkeypatching after the undo call. - + There is generally no need to call `undo()`, since it is called automatically during tear-down. - + Note that the same `monkeypatch` fixture is used across a single test function invocation. If `monkeypatch` is used both by the test function itself and one of the test fixtures, diff --git a/_pytest/python.py b/_pytest/python.py index 502fdc7ef..6242fd497 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -271,7 +271,7 @@ def pytest_namespace(): @fixture(scope="session") def pytestconfig(request): - """ the pytest config object with access to command line opts.""" + """ The pytest config object with access to command line opts.""" return request.config diff --git a/_pytest/tmpdir.py b/_pytest/tmpdir.py index ebc48dbe5..9986f5628 100644 --- a/_pytest/tmpdir.py +++ b/_pytest/tmpdir.py @@ -108,7 +108,7 @@ def tmpdir_factory(request): @pytest.fixture def tmpdir(request, tmpdir_factory): - """return a temporary directory path object + """Return a temporary directory path object which is unique to each test function invocation, created as a sub directory of the base temporary directory. The returned object is a `py.path.local`_