Opened 4 years ago

Closed 4 years ago

#5859 enhancement closed fixed (fixed)

Add more important assertions to twisted/trial/test/

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone:
Component: trial Keywords:
Cc: jml Branch: branches/extra-reporter-assertions-5859
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun


Many of the tests in operate by running a suite and then making assertions on the results/reporter object. Some of these tests skip checking certain parts of the reporter's state, though, which potentially allows a broken implementation to pass them.

The tests should have a few more assertions added to make sure a properly working implementation is really in use.

This is split off of #5853.

Change History (7)

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/extra-reporter-assertions-5859

(In [35170]) Branching to 'extra-reporter-assertions-5859'

comment:3 Changed 4 years ago by exarkun

(In [35171]) Add a few extra assertions to some existing test methods. Also add missing docstrings, cleanup whitespace, and fix test names.

refs #5859

comment:4 Changed 4 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

Okay, made those improvements. There's surely more that could be done here, like unifying the logic for asserting a particular result, rather than repeating the same (or, more often than not, not quite the same) group of 5 or 8 individual assertions. But I added the extra coverage I wanted, at least, and made some other minor cleanups as well.

Build results

comment:5 Changed 4 years ago by Julian

  • Keywords review removed
  • Owner set to Julian

comment:6 Changed 4 years ago by Julian

  • Owner changed from Julian to exarkun

Hello :).

There's a typo in TestSkipClasses's test_results test method (a doubled period). Other than that, what's here looks fine :).

comment:7 Changed 4 years ago by exarkun

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

(In [35176]) Merge extra-reporter-assertions-5859

Author: exarkun Reviewer: Julian Fixes: #5859

Expand the test coverage for what is done to the test results object passed in to a trial test suite. Also, clean up a few other minor issues such as whitespace and docstrings.

Note: See TracTickets for help on using tickets.