Opened 5 years ago

Closed 5 years ago

#5901 enhancement closed fixed (fixed)

Change trial's assert method implementation to stop emphasizing the `fail` variations

Reported by: Jean-Paul Calderone Owned by: Jean-Paul Calderone
Priority: normal Milestone:
Component: trial Keywords:
Cc: Jonathan Lange Branch: branches/trial-assert-5901
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

Everyone is switching to the assert spellings, including us.

Change History (8)

comment:1 Changed 5 years ago by DefaultCC Plugin

Cc: Jonathan Lange added

comment:2 Changed 5 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/trial-assert-5901

(In [35336]) Branching to 'trial-assert-5901'

comment:3 Changed 5 years ago by Jean-Paul Calderone

(In [35337]) Rename the assertion methods to start with "assert" and make "fail" be the aliases.

refs #5901

comment:4 Changed 5 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone deleted

comment:5 Changed 5 years ago by Julian Berman

Owner: set to Julian Berman

comment:6 Changed 5 years ago by Julian Berman

Keywords: review removed
Owner: changed from Julian Berman to Jean-Paul Calderone

Looks good to me. Only thing worth pointing out that I see is that assertWarns's def line will fit within 79 chars now.

Also, assertNotIsInstance's docstring is wrong. You're not changing that, so I guess that deserves another ticket if you don't want to fix it while you're here, or if you'd prefer that anyhow. The reason I mention it is that now that the assertion methods are defined using positive language, perhaps all of the docstrings might be clearer if they used that too so that you don't need any mental gymnastics to read them. That can go in another ticket too I guess if that's something reasonable sounding.

comment:7 Changed 5 years ago by Jean-Paul Calderone

(In [35347]) Fix an incorrect negation in assertNotIsInstance

refs #5901

comment:8 Changed 5 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [35348]) Merge trial-assert-5901

Author: exarkun Reviewer: Julian Fixes: #5901

Change trial's implementation of assertion methods so that they are named following the "assertXYZ" convention rather than the "failXYZ" convention.

Note: See TracTickets for help on using tickets.