Raymond Hettinger added the comment:
Sorry, I'm going to reject this one.
FWIW, I'm working on revising the example anyway (to not use the random module
and instead test something more straight-forward).
--
resolution: - rejected
status: open - closed
Ezio Melotti added the comment:
Raymond, the changes in the mock documentation look good to me, and I think
they can be applied.
Regarding the basic example in the unittest doc, I think the patch attached
to #11468 (or something similar) should be applied instead. That patch uses
Raymond Hettinger added the comment:
Please don't change the Basic Example section. It is designed to get people up
and running with a minimal set of asserts (including assertEqual, assertTrue,
and the two ways of using assertRaises). Modernizing the example will defeat
its purpose.
Ezio Melotti added the comment:
See also #11468.
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16751
___
___
Serhiy Storchaka added the comment:
But with the patch the minimal set of asserts will be assertEqual, assertIn,
and assertRaises. The example is just too old (assertIn was added in 3.1). If
you want to minimize assert's set, you can get rid of assertEqual too (using
only assertTrue). But I
New submission from Serhiy Storchaka:
The proposed patch update the documentation examples to use more modern
unittest asserts.
--
assignee: docs@python
components: Documentation, Tests
files: docs_unittest_assert.patch
keywords: easy, patch
messages: 177924
nosy: docs@python,
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16751
___
___