Opened 4 years ago

Closed 4 years ago

#5901 enhancement closed fixed (fixed)

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

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


Everyone is switching to the assert spellings, including us.

Change History (8)

comment:1 Changed 4 years ago by DefaultCC Plugin

  • Cc jml added

comment:2 Changed 4 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/trial-assert-5901

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

comment:3 Changed 4 years ago by exarkun

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

refs #5901

comment:4 Changed 4 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

comment:5 Changed 4 years ago by Julian

  • Owner set to Julian

comment:6 Changed 4 years ago by Julian

  • Keywords review removed
  • Owner changed from Julian to exarkun

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 4 years ago by exarkun

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

refs #5901

comment:8 Changed 4 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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.