Skip to content

Spelling and grammar fixes #3468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ Changes
* Testcase reports with a ``url`` attribute will now properly write this to junitxml.
Thanks `@fushi`_ for the PR (`#1874`_).

* Remove common items from dict comparision output when verbosity=1. Also update
* Remove common items from dict comparison output when verbosity=1. Also update
the truncation message to make it clearer that pytest truncates all
assertion messages if verbosity < 2 (`#1512`_).
Thanks `@mattduck`_ for the PR
Expand All @@ -1218,7 +1218,7 @@ Changes
* fix `#2013`_: turn RecordedWarning into ``namedtuple``,
to give it a comprehensible repr while preventing unwarranted modification.

* fix `#2208`_: ensure a iteration limit for _pytest.compat.get_real_func.
* fix `#2208`_: ensure an iteration limit for _pytest.compat.get_real_func.
Thanks `@RonnyPfannschmidt`_ for the report and PR.

* Hooks are now verified after collection is complete, rather than right after loading installed plugins. This
Expand Down Expand Up @@ -1322,7 +1322,7 @@ Bug Fixes
Notably, importing the ``anydbm`` module is fixed. (`#2248`_).
Thanks `@pfhayes`_ for the PR.

* junitxml: Fix problematic case where system-out tag occured twice per testcase
* junitxml: Fix problematic case where system-out tag occurred twice per testcase
element in the XML report. Thanks `@kkoukiou`_ for the PR.

* Fix regression, pytest now skips unittest correctly if run with ``--pdb``
Expand Down Expand Up @@ -2918,7 +2918,7 @@ time or change existing behaviors in order to make them less surprising/more use
"::" node id specifications (copy pasted from "-v" output)

- fix issue544 by only removing "@NUM" at the end of "::" separated parts
and if the part has an ".py" extension
and if the part has a ".py" extension

- don't use py.std import helper, rather import things directly.
Thanks Bruno Oliveira.
Expand Down Expand Up @@ -3189,7 +3189,7 @@ time or change existing behaviors in order to make them less surprising/more use

would not work correctly because pytest assumes @pytest.mark.some
gets a function to be decorated already. We now at least detect if this
arg is an lambda and thus the example will work. Thanks Alex Gaynor
arg is a lambda and thus the example will work. Thanks Alex Gaynor
for bringing it up.

- xfail a test on pypy that checks wrong encoding/ascii (pypy does
Expand Down Expand Up @@ -3502,7 +3502,7 @@ Bug fixes:
rather use the post-2.0 parametrize features instead of yield, see:
http://pytest.org/latest/example/parametrize.html
- fix autouse-issue where autouse-fixtures would not be discovered
if defined in a a/conftest.py file and tests in a/tests/test_some.py
if defined in an a/conftest.py file and tests in a/tests/test_some.py
- fix issue226 - LIFO ordering for fixture teardowns
- fix issue224 - invocations with >256 char arguments now work
- fix issue91 - add/discuss package/directory level setups in example
Expand Down Expand Up @@ -4072,7 +4072,7 @@ Bug fixes:
- make path.bestrelpath(path) return ".", note that when calling
X.bestrelpath the assumption is that X is a directory.
- make initial conftest discovery ignore "--" prefixed arguments
- fix resultlog plugin when used in an multicpu/multihost xdist situation
- fix resultlog plugin when used in a multicpu/multihost xdist situation
(thanks Jakub Gustak)
- perform distributed testing related reporting in the xdist-plugin
rather than having dist-related code in the generic py.test
Expand Down
2 changes: 1 addition & 1 deletion _pytest/_code/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class Source(object):
""" a immutable object holding a source code fragment,
""" an immutable object holding a source code fragment,
possibly deindenting it.
"""
_compilecounter = 0
Expand Down
2 changes: 1 addition & 1 deletion _pytest/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def disabled(self):


def safe_text_dupfile(f, mode, default_encoding="UTF8"):
""" return a open text file object that's a duplicate of f on the
""" return an open text file object that's a duplicate of f on the
FD-level if possible.
"""
encoding = getattr(f, "encoding", None)
Expand Down
2 changes: 1 addition & 1 deletion _pytest/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def safe_getattr(object, name, default):


def _is_unittest_unexpected_success_a_failure():
"""Return if the test suite should fail if a @expectedFailure unittest test PASSES.
"""Return if the test suite should fail if an @expectedFailure unittest test PASSES.

From https://docs.python.org/3/library/unittest.html?highlight=unittest#unittest.TestResult.wasSuccessful:
Changed in version 3.4: Returns False if there were any
Expand Down
2 changes: 1 addition & 1 deletion _pytest/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
DOCTEST_REPORT_CHOICE_ONLY_FIRST_FAILURE,
)

# Lazy definiton of runner class
# Lazy definition of runner class
RUNNER_CLASS = None


Expand Down
4 changes: 2 additions & 2 deletions _pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def node(self):
def _getnextfixturedef(self, argname):
fixturedefs = self._arg2fixturedefs.get(argname, None)
if fixturedefs is None:
# we arrive here because of a a dynamic call to
# we arrive here because of a dynamic call to
# getfixturevalue(argname) usage which was naturally
# not known at parsing/collection time
parentid = self._pyfuncitem.parent.nodeid
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def _getautousenames(self, nodeid):
def getfixtureclosure(self, fixturenames, parentnode):
# collect the closure of all fixtures , starting with the given
# fixturenames as the initial set. As we have to visit all
# factory definitions anyway, we also return a arg2fixturedefs
# factory definitions anyway, we also return an arg2fixturedefs
# mapping so that the caller can reuse it and does not have
# to re-discover fixturedefs again for each fixturename
# (discovering matching fixtures for a given name/node is expensive)
Expand Down
4 changes: 2 additions & 2 deletions _pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def pytest_addoption(parser):


def pytest_configure(config):
__import__('pytest').config = config # compatibiltiy
__import__('pytest').config = config # compatibility


def wrap_session(config, doit):
Expand Down Expand Up @@ -290,7 +290,7 @@ class Interrupted(KeyboardInterrupt):


class Failed(Exception):
""" signals an stop as failed test run. """
""" signals a stop as failed test run. """


class Session(nodes.FSCollector):
Expand Down
4 changes: 2 additions & 2 deletions _pytest/mark/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __call__(self, *args, **kwargs):

def get_unpacked_marks(obj):
"""
obtain the unpacked marks that are stored on a object
obtain the unpacked marks that are stored on an object
"""
mark_list = getattr(obj, 'pytestmark', [])

Expand All @@ -217,7 +217,7 @@ def get_unpacked_marks(obj):


def store_mark(obj, mark):
"""store a Mark on a object
"""store a Mark on an object
this is used to implement the Mark declarations/decorators correctly
"""
assert isinstance(mark, Mark), mark
Expand Down
2 changes: 1 addition & 1 deletion _pytest/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def skip(msg="", **kwargs):


def fail(msg="", pytrace=True):
""" explicitly fail an currently-executing test with the given Message.
""" explicitly fail a currently-executing test with the given Message.

:arg pytrace: if false the msg represents the full failure information
and no python traceback will be reported.
Expand Down
2 changes: 1 addition & 1 deletion _pytest/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def filter_traceback(entry):
is_generated = '<' in raw_filename and '>' in raw_filename
if is_generated:
return False
# entry.path might point to an non-existing file, in which case it will
# entry.path might point to a non-existing file, in which case it will
# also return a str object. see #1133
p = py.path.local(entry.path)
return not p.relto(_pluggy_dir) and not p.relto(_pytest_dir) and not p.relto(_py_dir)
Expand Down
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ comes with the following fixes and features:
rather use the post-2.0 parametrize features instead of yield, see:
http://pytest.org/latest/example/parametrize.html
- fix autouse-issue where autouse-fixtures would not be discovered
if defined in a a/conftest.py file and tests in a/tests/test_some.py
if defined in an a/conftest.py file and tests in a/tests/test_some.py
- fix issue226 - LIFO ordering for fixture teardowns
- fix issue224 - invocations with >256 char arguments now work
- fix issue91 - add/discuss package/directory level setups in example
Expand Down
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.6.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Changes 2.6.1
"::" node id specifications (copy pasted from "-v" output)

- fix issue544 by only removing "@NUM" at the end of "::" separated parts
and if the part has an ".py" extension
and if the part has a ".py" extension

- don't use py.std import helper, rather import things directly.
Thanks Bruno Oliveira.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ If you run this with reporting for skips enabled::

=================== 1 passed, 1 skipped in 0.12 seconds ====================

You'll see that we don't have a ``opt2`` module and thus the second test run
You'll see that we don't have an ``opt2`` module and thus the second test run
of our ``test_func1`` was skipped. A few notes:

- the fixture functions in the ``conftest.py`` file are "session-scoped" because we
Expand Down
2 changes: 1 addition & 1 deletion doc/en/goodpractices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Note that this layout also works in conjunction with the ``src`` layout mentione

.. note::

If ``pytest`` finds a "a/b/test_module.py" test file while
If ``pytest`` finds an "a/b/test_module.py" test file while
recursing into the filesystem it determines the import name
as follows:

Expand Down
4 changes: 2 additions & 2 deletions doc/en/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,8 @@ passed multiple times. The expected format is ``name=value``. For example::

Allows to pick the action for empty parametersets in parameterization

* ``skip`` skips tests with a empty parameterset (default)
* ``xfail`` marks tests with a empty parameterset as xfail(run=False)
* ``skip`` skips tests with an empty parameterset (default)
* ``xfail`` marks tests with an empty parameterset as xfail(run=False)

.. code-block:: ini

Expand Down
2 changes: 1 addition & 1 deletion testing/code/test_excinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ def test(tmpdir):
def test_exception_repr_extraction_error_on_recursion():
"""
Ensure we can properly detect a recursion error even
if some locals raise error on comparision (#2459).
if some locals raise error on comparison (#2459).
"""
class numpy_like(object):

Expand Down
2 changes: 1 addition & 1 deletion testing/python/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ def test_func2(request):

def test_callables_nocode(self, testdir):
"""
a imported mock.call would break setup/factory discovery
an imported mock.call would break setup/factory discovery
due to it being callable and __code__ not being a code object
"""
testdir.makepyfile("""
Expand Down
2 changes: 1 addition & 1 deletion testing/test_assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def __repr__(self):
def test_one_repr_empty(self):
"""
the faulty empty string repr did trigger
a unbound local error in _diff_text
an unbound local error in _diff_text
"""
class A(str):
def __repr__(self):
Expand Down
2 changes: 1 addition & 1 deletion testing/test_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def test_capturing_readouterr_unicode(self):
reason='text output different for bytes on python3')
def test_capturing_readouterr_decode_error_handling(self):
with self.getcapture() as cap:
# triggered a internal error in pytest
# triggered an internal error in pytest
print('\xa6')
out, err = cap.readouterr()
assert out == py.builtin._totext('\ufffd\n', 'unicode-escape')
Expand Down
2 changes: 1 addition & 1 deletion testing/test_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def test_parsefactories_relative_node_ids(
(None, 1, 1),
])
def test_search_conftest_up_to_inifile(testdir, confcutdir, passed, error):
"""Test that conftest files are detected only up to a ini file, unless
"""Test that conftest files are detected only up to an ini file, unless
an explicit --confcutdir option is given.
"""
root = testdir.tmpdir
Expand Down
2 changes: 1 addition & 1 deletion testing/test_nose.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_first(self):


def test_apiwrapper_problem_issue260(testdir):
# this would end up trying a call a optional teardown on the class
# this would end up trying a call an optional teardown on the class
# for plain unittests we dont want nose behaviour
testdir.makepyfile("""
import unittest
Expand Down