Skip to content

Commit aa51fcb

Browse files
committed
Spelling and grammar fixes
1 parent 84b37e1 commit aa51fcb

21 files changed

+31
-31
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ Changes
12061206
* Testcase reports with a ``url`` attribute will now properly write this to junitxml.
12071207
Thanks `@fushi`_ for the PR (`#1874`_).
12081208

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

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

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

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

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

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

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

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

31953195
- xfail a test on pypy that checks wrong encoding/ascii (pypy does
@@ -3502,7 +3502,7 @@ Bug fixes:
35023502
rather use the post-2.0 parametrize features instead of yield, see:
35033503
http://pytest.org/latest/example/parametrize.html
35043504
- fix autouse-issue where autouse-fixtures would not be discovered
3505-
if defined in a a/conftest.py file and tests in a/tests/test_some.py
3505+
if defined in an a/conftest.py file and tests in a/tests/test_some.py
35063506
- fix issue226 - LIFO ordering for fixture teardowns
35073507
- fix issue224 - invocations with >256 char arguments now work
35083508
- fix issue91 - add/discuss package/directory level setups in example
@@ -4072,7 +4072,7 @@ Bug fixes:
40724072
- make path.bestrelpath(path) return ".", note that when calling
40734073
X.bestrelpath the assumption is that X is a directory.
40744074
- make initial conftest discovery ignore "--" prefixed arguments
4075-
- fix resultlog plugin when used in an multicpu/multihost xdist situation
4075+
- fix resultlog plugin when used in a multicpu/multihost xdist situation
40764076
(thanks Jakub Gustak)
40774077
- perform distributed testing related reporting in the xdist-plugin
40784078
rather than having dist-related code in the generic py.test

_pytest/_code/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class Source(object):
17-
""" a immutable object holding a source code fragment,
17+
""" an immutable object holding a source code fragment,
1818
possibly deindenting it.
1919
"""
2020
_compilecounter = 0

_pytest/capture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def disabled(self):
315315

316316

317317
def safe_text_dupfile(f, mode, default_encoding="UTF8"):
318-
""" return a open text file object that's a duplicate of f on the
318+
""" return an open text file object that's a duplicate of f on the
319319
FD-level if possible.
320320
"""
321321
encoding = getattr(f, "encoding", None)

_pytest/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def safe_getattr(object, name, default):
257257

258258

259259
def _is_unittest_unexpected_success_a_failure():
260-
"""Return if the test suite should fail if a @expectedFailure unittest test PASSES.
260+
"""Return if the test suite should fail if an @expectedFailure unittest test PASSES.
261261
262262
From https://docs.python.org/3/library/unittest.html?highlight=unittest#unittest.TestResult.wasSuccessful:
263263
Changed in version 3.4: Returns False if there were any

_pytest/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
DOCTEST_REPORT_CHOICE_ONLY_FIRST_FAILURE,
2525
)
2626

27-
# Lazy definiton of runner class
27+
# Lazy definition of runner class
2828
RUNNER_CLASS = None
2929

3030

_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def node(self):
290290
def _getnextfixturedef(self, argname):
291291
fixturedefs = self._arg2fixturedefs.get(argname, None)
292292
if fixturedefs is None:
293-
# we arrive here because of a a dynamic call to
293+
# we arrive here because of a dynamic call to
294294
# getfixturevalue(argname) usage which was naturally
295295
# not known at parsing/collection time
296296
parentid = self._pyfuncitem.parent.nodeid
@@ -1026,7 +1026,7 @@ def _getautousenames(self, nodeid):
10261026
def getfixtureclosure(self, fixturenames, parentnode):
10271027
# collect the closure of all fixtures , starting with the given
10281028
# fixturenames as the initial set. As we have to visit all
1029-
# factory definitions anyway, we also return a arg2fixturedefs
1029+
# factory definitions anyway, we also return an arg2fixturedefs
10301030
# mapping so that the caller can reuse it and does not have
10311031
# to re-discover fixturedefs again for each fixturename
10321032
# (discovering matching fixtures for a given name/node is expensive)

_pytest/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def pytest_addoption(parser):
9090

9191

9292
def pytest_configure(config):
93-
__import__('pytest').config = config # compatibiltiy
93+
__import__('pytest').config = config # compatibility
9494

9595

9696
def wrap_session(config, doit):
@@ -290,7 +290,7 @@ class Interrupted(KeyboardInterrupt):
290290

291291

292292
class Failed(Exception):
293-
""" signals an stop as failed test run. """
293+
""" signals a stop as failed test run. """
294294

295295

296296
class Session(nodes.FSCollector):

_pytest/mark/structures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def __call__(self, *args, **kwargs):
204204

205205
def get_unpacked_marks(obj):
206206
"""
207-
obtain the unpacked marks that are stored on a object
207+
obtain the unpacked marks that are stored on an object
208208
"""
209209
mark_list = getattr(obj, 'pytestmark', [])
210210

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

218218

219219
def store_mark(obj, mark):
220-
"""store a Mark on a object
220+
"""store a Mark on an object
221221
this is used to implement the Mark declarations/decorators correctly
222222
"""
223223
assert isinstance(mark, Mark), mark

_pytest/outcomes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def skip(msg="", **kwargs):
8383

8484

8585
def fail(msg="", pytrace=True):
86-
""" explicitly fail an currently-executing test with the given Message.
86+
""" explicitly fail a currently-executing test with the given Message.
8787
8888
:arg pytrace: if false the msg represents the full failure information
8989
and no python traceback will be reported.

_pytest/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def filter_traceback(entry):
5555
is_generated = '<' in raw_filename and '>' in raw_filename
5656
if is_generated:
5757
return False
58-
# entry.path might point to an non-existing file, in which case it will
58+
# entry.path might point to a non-existing file, in which case it will
5959
# also return a str object. see #1133
6060
p = py.path.local(entry.path)
6161
return not p.relto(_pluggy_dir) and not p.relto(_pytest_dir) and not p.relto(_py_dir)

doc/en/announce/release-2.3.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ comes with the following fixes and features:
1818
rather use the post-2.0 parametrize features instead of yield, see:
1919
http://pytest.org/latest/example/parametrize.html
2020
- fix autouse-issue where autouse-fixtures would not be discovered
21-
if defined in a a/conftest.py file and tests in a/tests/test_some.py
21+
if defined in an a/conftest.py file and tests in a/tests/test_some.py
2222
- fix issue226 - LIFO ordering for fixture teardowns
2323
- fix issue224 - invocations with >256 char arguments now work
2424
- fix issue91 - add/discuss package/directory level setups in example

doc/en/announce/release-2.6.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Changes 2.6.1
5252
"::" node id specifications (copy pasted from "-v" output)
5353

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

5757
- don't use py.std import helper, rather import things directly.
5858
Thanks Bruno Oliveira.

doc/en/example/parametrize.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ If you run this with reporting for skips enabled::
469469
470470
=================== 1 passed, 1 skipped in 0.12 seconds ====================
471471

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

475475
- the fixture functions in the ``conftest.py`` file are "session-scoped" because we

doc/en/goodpractices.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Note that this layout also works in conjunction with the ``src`` layout mentione
145145

146146
.. note::
147147

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

doc/en/reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,8 @@ passed multiple times. The expected format is ``name=value``. For example::
933933

934934
Allows to pick the action for empty parametersets in parameterization
935935

936-
* ``skip`` skips tests with a empty parameterset (default)
937-
* ``xfail`` marks tests with a empty parameterset as xfail(run=False)
936+
* ``skip`` skips tests with an empty parameterset (default)
937+
* ``xfail`` marks tests with an empty parameterset as xfail(run=False)
938938

939939
.. code-block:: ini
940940

testing/code/test_excinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ def test(tmpdir):
11981198
def test_exception_repr_extraction_error_on_recursion():
11991199
"""
12001200
Ensure we can properly detect a recursion error even
1201-
if some locals raise error on comparision (#2459).
1201+
if some locals raise error on comparison (#2459).
12021202
"""
12031203
class numpy_like(object):
12041204

testing/python/fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ def test_func2(request):
15531553

15541554
def test_callables_nocode(self, testdir):
15551555
"""
1556-
a imported mock.call would break setup/factory discovery
1556+
an imported mock.call would break setup/factory discovery
15571557
due to it being callable and __code__ not being a code object
15581558
"""
15591559
testdir.makepyfile("""

testing/test_assertion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def __repr__(self):
473473
def test_one_repr_empty(self):
474474
"""
475475
the faulty empty string repr did trigger
476-
a unbound local error in _diff_text
476+
an unbound local error in _diff_text
477477
"""
478478
class A(str):
479479
def __repr__(self):

testing/test_capture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ def test_capturing_readouterr_unicode(self):
998998
reason='text output different for bytes on python3')
999999
def test_capturing_readouterr_decode_error_handling(self):
10001000
with self.getcapture() as cap:
1001-
# triggered a internal error in pytest
1001+
# triggered an internal error in pytest
10021002
print('\xa6')
10031003
out, err = cap.readouterr()
10041004
assert out == py.builtin._totext('\ufffd\n', 'unicode-escape')

testing/test_conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def test_parsefactories_relative_node_ids(
373373
(None, 1, 1),
374374
])
375375
def test_search_conftest_up_to_inifile(testdir, confcutdir, passed, error):
376-
"""Test that conftest files are detected only up to a ini file, unless
376+
"""Test that conftest files are detected only up to an ini file, unless
377377
an explicit --confcutdir option is given.
378378
"""
379379
root = testdir.tmpdir

testing/test_nose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def test_first(self):
289289

290290

291291
def test_apiwrapper_problem_issue260(testdir):
292-
# this would end up trying a call a optional teardown on the class
292+
# this would end up trying a call an optional teardown on the class
293293
# for plain unittests we dont want nose behaviour
294294
testdir.makepyfile("""
295295
import unittest

0 commit comments

Comments
 (0)