Opened 4 years ago

Last modified 4 years ago

#6363 enhancement new

Make twisted.trial.unittest._iterateTests public.

Reported by: tom.prince Owned by: tom.prince
Priority: normal Milestone:
Component: trial Keywords:
Cc: jml Branch: branches/public-iterateTests-6363
branch-diff, diff-cov, branch-cov, buildbot
Author: tomprince


#3231 is removing support for visiting tests suites. But there isn't any good replacement for it. We have _iterateTests which provides the same functionality, which is used throughout trial. We should provide it to users, as a replacement for visitors. (See 6333#comment:5 for some rationale).

Change History (6)

comment:1 Changed 4 years ago by DefaultCC Plugin

  • Cc jml added

comment:2 Changed 4 years ago by tomprince

  • Author set to tomprince
  • Branch set to branches/public-iterateTests-6363

(In [37469]) Branching to public-iterateTests-6363.

comment:3 Changed 4 years ago by tom.prince

  • Keywords review added
  • Owner tom.prince deleted

comment:4 Changed 4 years ago by exarkun

  • Keywords review removed
  • Owner set to tom.prince

But there isn't any good replacement for it.

Why should it be replaced? Who is using this functionality outside of the implementation of trial? What is it useful for?

This widens the interface of trial in an area where we're not really the bosses. Who says it's actually possible to iterate over all the tests in a TestSuite? Before accepting this new public API, we should consider whether it will have interoperability issues with other unittest users and other xUnit tools, and we should consider whether it's worth adding at all without real world use cases.

comment:5 Changed 4 years ago by exarkun

I also added a response to 6333#comment:5 at 6333#comment:6.

comment:6 Changed 4 years ago by tom.prince

Hmm. I'm almost tempted to move this to python instead, since the implementation doesn't actually care what it is iterating.

Note: See TracTickets for help on using tickets.