Files
MINGW-packages/mingw-w64-python-testtools/33dc6c8c67620863d14622df49e9834ac6fe72b7.patch
J. Peter Mugaas 4d9ec2ac59 A bundle of python packages I was working on. These are checked in together since they depend upon eachother. (#4129)
contextlib2
linecache2
traceback2
unittest2
python-extras
fixtures
pyrsistent
subunit
testscenerios
testtools
2018-07-31 11:29:12 +03:00

213 lines
9.6 KiB
Diff

From 33dc6c8c67620863d14622df49e9834ac6fe72b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Mon, 29 May 2017 12:38:04 +0300
Subject: [PATCH] Spelling fixes (#261)
---
NEWS | 6 +++---
doc/for-framework-folk.rst | 4 ++--
testtools/assertions.py | 2 +-
testtools/matchers/_exception.py | 2 +-
testtools/testcase.py | 4 ++--
testtools/testresult/real.py | 2 +-
testtools/tests/matchers/test_exception.py | 8 ++++----
testtools/tests/test_testresult.py | 6 +++---
testtools/testsuite.py | 6 +++---
9 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/NEWS b/NEWS
index 03495e24..bf76c96b 100644
--- a/NEWS
+++ b/NEWS
@@ -104,7 +104,7 @@ Improvements
* ``MatchesListwise`` has more informative error when lengths don't match.
(Jonathan Lange)
-* The short form of errors for failed binary comparisions will now put the
+* The short form of errors for failed binary comparisons will now put the
expected value on the _right_. This means that ``assertThat(2, Equals(3))``
will raise an error saying ``2 != 3``.
(Jonathan Lange, #1525227)
@@ -274,7 +274,7 @@ Changes
our exception lookup priorities to support it. Regular skips done through
raise self.skipException will continue to work, since they were always caught
in our code - its because the suite type being used to implement setUpClass
- has changed that an issue occured.
+ has changed that an issue occurred.
(Robert Collins, #1393068)
1.2.1
@@ -295,7 +295,7 @@ Changes
* Depends on unittest2 for discovery functionality and the ``TestProgram`` base
class. This brings in many fixes made to discovery where previously we were
only using the discovery package or the version in the release of Python
- that the test execution was occuring on. (Robert Collins, #1271133)
+ that the test execution was occurring on. (Robert Collins, #1271133)
* Fixed unit tests which were failing under pypy due to a change in the way
pypy formats tracebacks. (Thomi Richards)
diff --git a/doc/for-framework-folk.rst b/doc/for-framework-folk.rst
index 4c970d7d..a91acb7f 100644
--- a/doc/for-framework-folk.rst
+++ b/doc/for-framework-folk.rst
@@ -297,7 +297,7 @@ TestResult.addSkip
This method is called on result objects when a test skips. The
``testtools.TestResult`` class records skips in its ``skip_reasons`` instance
-dict. The can be reported on in much the same way as succesful tests.
+dict. The can be reported on in much the same way as successful tests.
TestResult.time
@@ -393,7 +393,7 @@ Extensions to TestSuite
ConcurrentTestSuite
-------------------
-A TestSuite for parallel testing. This is used in conjuction with a helper that
+A TestSuite for parallel testing. This is used in conjunction with a helper that
runs a single suite in some parallel fashion (for instance, forking, handing
off to a subprocess, to a compute cloud, or simple threads).
ConcurrentTestSuite uses the helper to get a number of separate runnable
diff --git a/testtools/assertions.py b/testtools/assertions.py
index 6c5f67e7..b241df63 100644
--- a/testtools/assertions.py
+++ b/testtools/assertions.py
@@ -12,7 +12,7 @@ def assert_that(matchee, matcher, message='', verbose=False):
"""Assert that matchee is matched by matcher.
This should only be used when you need to use a function based
- matcher, assertThat in Testtools.Testcase is prefered and has more
+ matcher, assertThat in Testtools.Testcase is preferred and has more
features
:param matchee: An object to match with matcher.
diff --git a/testtools/matchers/_exception.py b/testtools/matchers/_exception.py
index cd4c90bf..23eaa601 100644
--- a/testtools/matchers/_exception.py
+++ b/testtools/matchers/_exception.py
@@ -81,7 +81,7 @@ def __str__(self):
class Raises(Matcher):
"""Match if the matchee raises an exception when called.
- Exceptions which are not subclasses of Exception propogate out of the
+ Exceptions which are not subclasses of Exception propagate out of the
Raises.match call unless they are explicitly matched.
"""
diff --git a/testtools/testcase.py b/testtools/testcase.py
index 7a10d7e0..c6166cf9 100644
--- a/testtools/testcase.py
+++ b/testtools/testcase.py
@@ -82,7 +82,7 @@ class _UnexpectedSuccess(Exception):
class _ExpectedFailure(Exception):
- """An expected failure occured.
+ """An expected failure occurred.
Note that this exception is private plumbing in testtools' testcase
module.
@@ -391,7 +391,7 @@ def addOnException(self, handler):
the exception has caused.
Handlers are called in first-added, first-called order, and if they
- raise an exception, that will propogate out of the test running
+ raise an exception, that will propagate out of the test running
machinery, halting test processing. As a result, do not call code that
may unreasonably fail.
"""
diff --git a/testtools/testresult/real.py b/testtools/testresult/real.py
index 8c5aefca..0b927c64 100644
--- a/testtools/testresult/real.py
+++ b/testtools/testresult/real.py
@@ -969,7 +969,7 @@ def stopTestRun(self):
self._hook.stopTestRun()
def wasSuccessful(self):
- """Return False if any failure has occured.
+ """Return False if any failure has occurred.
Note that incomplete tests can only be detected when stopTestRun is
called, so that should be called before checking wasSuccessful.
diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py
index 9ef36b87..6cd80af1 100644
--- a/testtools/tests/matchers/test_exception.py
+++ b/testtools/tests/matchers/test_exception.py
@@ -150,17 +150,17 @@ def test_KeyboardInterrupt_matched(self):
matcher = Raises(MatchesException(KeyboardInterrupt))
self.assertThat(self.raiser, matcher)
- def test_KeyboardInterrupt_propogates(self):
- # The default 'it raised' propogates KeyboardInterrupt.
+ def test_KeyboardInterrupt_propagates(self):
+ # The default 'it raised' propagates KeyboardInterrupt.
match_keyb = Raises(MatchesException(KeyboardInterrupt))
def raise_keyb_from_match():
matcher = Raises()
matcher.match(self.raiser)
self.assertThat(raise_keyb_from_match, match_keyb)
- def test_KeyboardInterrupt_match_Exception_propogates(self):
+ def test_KeyboardInterrupt_match_Exception_propagates(self):
# If the raised exception isn't matched, and it is not a subclass of
- # Exception, it is propogated.
+ # Exception, it is propagated.
match_keyb = Raises(MatchesException(KeyboardInterrupt))
def raise_keyb_from_match():
matcher = Raises(MatchesException(Exception))
diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py
index 7b0b212d..cd96f318 100644
--- a/testtools/tests/test_testresult.py
+++ b/testtools/tests/test_testresult.py
@@ -2530,13 +2530,13 @@ def _write_module(self, name, encoding, contents):
def _test_external_case(self, testline, coding="ascii", modulelevel="",
suffix=""):
- """Create and run a test case in a seperate module"""
+ """Create and run a test case in a separate module"""
self._setup_external_case(testline, coding, modulelevel, suffix)
return self._run_external_case()
def _setup_external_case(self, testline, coding="ascii", modulelevel="",
suffix=""):
- """Create a test case in a seperate module"""
+ """Create a test case in a separate module"""
_, prefix, self.modname = self.id().rsplit(".", 2)
self.dir = tempfile.mkdtemp(prefix=prefix, suffix=suffix)
self.addCleanup(shutil.rmtree, self.dir)
@@ -2552,7 +2552,7 @@ def _setup_external_case(self, testline, coding="ascii", modulelevel="",
" %s\n" % (coding, modulelevel, testline))
def _run_external_case(self):
- """Run the prepared test case in a seperate module"""
+ """Run the prepared test case in a separate module"""
sys.path.insert(0, self.dir)
self.addCleanup(sys.path.remove, self.dir)
module = __import__(self.modname)
diff --git a/testtools/testsuite.py b/testtools/testsuite.py
index d12f1882..bc9e77c6 100644
--- a/testtools/testsuite.py
+++ b/testtools/testsuite.py
@@ -250,7 +250,7 @@ def filter_by_ids(suite_or_case, test_ids):
fails the predicate when it will return a new unittest.TestSuite with
no contents.
- This helper exists to provide backwards compatability with older versions
+ This helper exists to provide backwards compatibility with older versions
of Python (currently all versions :)) that don't have a native
filter_by_ids() method on Test(Case|Suite).
@@ -267,10 +267,10 @@ def filter_by_ids(suite_or_case, test_ids):
For anything else, it is not filtered - it is returned as-is.
- To provide compatability with this routine for a custom TestSuite, just
+ To provide compatibility with this routine for a custom TestSuite, just
define a filter_by_ids() method that will return a TestSuite equivalent to
the original minus any tests not in test_ids.
- Similarly to provide compatability for a custom TestCase that does
+ Similarly to provide compatibility for a custom TestCase that does
something unusual define filter_by_ids to return a new TestCase object
that will only run test_ids that are in the provided container. If none
would run, return an empty TestSuite().