classification
Title: Use better idiom in unittest example
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Improve unittest basic example in the doc
View: 11468
Assigned To: docs@python Nosy List: Claudiu.Popa, docs@python, ezio.melotti, rhettinger
Priority: normal Keywords: patch

Created on 2014-05-27 12:22 by Claudiu.Popa, last changed 2014-05-27 12:29 by ezio.melotti. This issue is now closed.

Files
File name Uploaded Description Edit
unittest_better_idiom.patch Claudiu.Popa, 2014-05-27 12:22 review
Messages (2)
msg219216 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-05-27 12:22
Hello.

This patch proposes using `assertIn` in the first unittest example, instead of `assertTrue(x in seq)`. This is clearer and recommending it first is better for beginners.
msg219217 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-05-27 12:29
This is a duplicate of #11468.
History
Date User Action Args
2014-05-27 12:29:16ezio.melottisetstatus: open -> closed

superseder: Improve unittest basic example in the doc

nosy: + rhettinger, ezio.melotti
messages: + msg219217
resolution: duplicate
stage: resolved
2014-05-27 12:22:37Claudiu.Popacreate