Skip Menu |

This queue is for tickets about the Test-Class CPAN distribution.

Report information
The Basics
Id: 78059
Status: rejected
Priority: 0/
Queue: Test-Class

People
Owner: Nobody in particular
Requestors: doug [...] oneupweb.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.37
Fixed in: (no value)



Subject: Feature change (empty test class "optimization") breaks my tests!
I use a base class with startup and shutdown methods to run common tests (optionally including AUTHOR tests) for every module, even before there are any tests in the module's test class. I therefore depend on those base class methods running, so now tests fail with 'Parse errors: No plan found in TAP output'. Before yesterday :-), they would at least be minimally tested. I need control over this "feature", at least! From Changelog: - Startup and shutdown methods are no longer run if a class will not run any test methods
From: dmaestro
On Tue Jun 26 13:46:37 2012, http://dmaestro12.myopenid.com/ wrote: Show quoted text
> I use a base class with startup and shutdown methods to run common tests > (optionally including AUTHOR tests) for every module
I think I begin to see a benefit for this change (which was a mystery to me for a while) after all. Before, I had to hack my base class (which has no normal tests) to do the right thing when the startup methods ran *against the base class* - which was to do nothing! That hack seems to be unnecessary now. Still, I need to update all of my 'empty' test classes with a test method, or revert to the previous Test::Class version. The following code is sufficient, as only a test method is required, not any actual tests: sub _10_no_tests : Tests(0) { }
Hi, Sorry to hear you hit some problems with the change. The "fix" was because there are a chunk of folk who have fairly expensive setup/teardown functions. Running those unnecessarily slows down their test suites. Also "logically" startup/shutdown should behave the same way as setup/teardown. Since you've found a work around already - are you okay to have this marked as "no a bug" (aka "rejected" in the rather inpolite terms of RT :) Cheers, Adrian On Tue Jun 26 14:44:30 2012, http://dmaestro12.myopenid.com/ wrote: Show quoted text
> On Tue Jun 26 13:46:37 2012, http://dmaestro12.myopenid.com/ wrote:
> > I use a base class with startup and shutdown methods to run common tests > > (optionally including AUTHOR tests) for every module
> > I think I begin to see a benefit for this change (which was a mystery to > me for a while) after all. Before, I had to hack my base class (which > has no normal tests) to do the right thing when the startup methods ran > *against the base class* - which was to do nothing! That hack seems to > be unnecessary now. > > Still, I need to update all of my 'empty' test classes with a test > method, or revert to the previous Test::Class version. The following > code is sufficient, as only a test method is required, not any actual tests: > > sub _10_no_tests : Tests(0) { }
From: dmaestro
On Tue Jun 26 15:37:39 2012, ADIE wrote: Show quoted text
> Since you've found a work around already - are you okay to have this > marked as "no a bug" (aka > "rejected" in the rather impolite terms of RT :) > > Cheers, > > Adrian >
Yes, I think that's fine; although I suggest you leave it up for a while since other people might be looking for justification of an incompatible change. (I'm persuaded there is) I happened to hit this right away because I was building a clean test environment from scratch (using perlbrew) and chose to follow Test::Class at it's latest version. I got surprised when things that worked just a few days ago suddenly stopped! It's OK, though. It's a tough balance maintaining (or not) backward compatibility. DLS
Coolio. I'll mark it as rejected in a week (assuming nobody else chips in) Thanks again for getting in touch. Cheers, Adrian On Tue Jun 26 16:01:50 2012, http://dmaestro12.myopenid.com/ wrote: Show quoted text
> On Tue Jun 26 15:37:39 2012, ADIE wrote:
> > Since you've found a work around already - are you okay to have this > > marked as "no a bug" (aka > > "rejected" in the rather impolite terms of RT :) > > > > Cheers, > > > > Adrian > >
> > Yes, I think that's fine; although I suggest you leave it up for a while > since other people might be looking for justification of an incompatible > change. (I'm persuaded there is) I happened to hit this right away > because I was building a clean test environment from scratch (using > perlbrew) and chose to follow Test::Class at it's latest version. I got > surprised when things that worked just a few days ago suddenly stopped! > > It's OK, though. It's a tough balance maintaining (or not) backward > compatibility. > > DLS
On Wed Jun 27 06:40:39 2012, ADIE wrote: Show quoted text
> Coolio. I'll mark it as rejected in a week (assuming nobody else chips in) >
It appears this ticket's Status should be changed to Rejected. Thank you very much. Jim Keenan