summaryrefslogtreecommitdiff
path: root/lib/testtools/doc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-12-26 22:11:04 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-12-27 19:23:03 +0100
commit983a3ea437d76b769b82726cc602d26e0e57894a (patch)
treece7bb9a0896fcbf53fe02c60e3199500f9e4833e /lib/testtools/doc
parent24957527e0250a9a5d4c51ff47db9ff2eb11ee7b (diff)
downloadsamba-983a3ea437d76b769b82726cc602d26e0e57894a.tar.gz
samba-983a3ea437d76b769b82726cc602d26e0e57894a.tar.bz2
samba-983a3ea437d76b769b82726cc602d26e0e57894a.zip
testtools: Update to latest upstream version.
Diffstat (limited to 'lib/testtools/doc')
-rw-r--r--lib/testtools/doc/for-framework-folk.rst11
-rw-r--r--lib/testtools/doc/for-test-authors.rst2
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/testtools/doc/for-framework-folk.rst b/lib/testtools/doc/for-framework-folk.rst
index ff9e71e71e..ecc11f38e9 100644
--- a/lib/testtools/doc/for-framework-folk.rst
+++ b/lib/testtools/doc/for-framework-folk.rst
@@ -222,6 +222,17 @@ A test suite that sets up a fixture_ before running any tests, and then tears
it down after all of the tests are run. The fixture is *not* made available to
any of the tests.
+sorted_tests
+------------
+
+Given the composite structure of TestSuite / TestCase, sorting tests is
+problematic - you can't tell what functionality is embedded into custom Suite
+implementations. In order to deliver consistent test orders when using test
+discovery (see http://bugs.python.org/issue16709), testtools flattens and
+sorts tests that have the standard TestSuite, defines a new method sort_tests,
+which can be used by non-standard TestSuites to know when they should sort
+their tests.
+
.. _`testtools API docs`: http://mumak.net/testtools/apidocs/
.. _unittest: http://docs.python.org/library/unittest.html
.. _fixture: http://pypi.python.org/pypi/fixtures
diff --git a/lib/testtools/doc/for-test-authors.rst b/lib/testtools/doc/for-test-authors.rst
index b83221bd5d..c9e6c6adc7 100644
--- a/lib/testtools/doc/for-test-authors.rst
+++ b/lib/testtools/doc/for-test-authors.rst
@@ -432,7 +432,7 @@ example::
def test_keys_equal(self):
x = {'a': 1, 'b': 2}
y = {'a': 2, 'b': 3}
- self.assertThat(a, KeysEqual(b))
+ self.assertThat(x, KeysEqual(y))
MatchesRegex