Fix example in docstring for failed
This commit is contained in:
2
NEWS
2
NEWS
@@ -14,6 +14,8 @@ Improvements
|
|||||||
|
|
||||||
* New ``Always`` and ``Never`` matchers. (Tristan Seligmann, #947026)
|
* New ``Always`` and ``Never`` matchers. (Tristan Seligmann, #947026)
|
||||||
|
|
||||||
|
* Fixed example in ``failed`` docstring. (Jonathan Lange, Github #208)
|
||||||
|
|
||||||
2.0.0
|
2.0.0
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ def failed(matcher):
|
|||||||
For example::
|
For example::
|
||||||
|
|
||||||
error = RuntimeError('foo')
|
error = RuntimeError('foo')
|
||||||
fails_at_runtime = failed(Equals(error))
|
fails_at_runtime = failed(
|
||||||
|
AfterPreprocessing(lambda f: f.value, Equals(error)))
|
||||||
deferred = defer.fail(error)
|
deferred = defer.fail(error)
|
||||||
assert_that(deferred, fails_at_runtime)
|
assert_that(deferred, fails_at_runtime)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user