Re: Comment about BAIL_OUT

2007-01-07 Thread Michael G Schwern
Randal L. Schwartz wrote: >> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes: > > Michael> Adam Kennedy wrote: >>> Lately I find myself cheating a bit on the test naming as well, by just >>> calling the testing package t::lib::Test. >>> >>> That saves me one entire line :) > > Micha

Re: Comment about BAIL_OUT

2007-01-07 Thread Randal L. Schwartz
> "Michael" == Michael G Schwern <[EMAIL PROTECTED]> writes: Michael> Adam Kennedy wrote: >> Lately I find myself cheating a bit on the test naming as well, by just >> calling the testing package t::lib::Test. >> >> That saves me one entire line :) Michael> Relying on . being in @INC makes m

Re: Comment about BAIL_OUT

2007-01-07 Thread David Landgren
Ovid did write: --- Michael G Schwern <[EMAIL PROTECTED]> wrote: Adam Kennedy wrote: Personally, I've always wanted a per-file bail_out as well, that can just abort the current test script, rather than the entire testing process. Schwern? :) die. Definitely the way to go. Up until I st

Re: Comment about BAIL_OUT

2007-01-07 Thread Ovid
--- Michael G Schwern <[EMAIL PROTECTED]> wrote: > Adam Kennedy wrote: > > Personally, I've always wanted a per-file bail_out as well, that > can > > just abort the current test script, rather than the entire testing > process. > > > > Schwern? :) > > die. Definitely the way to go. Up until I

Re: Comment about BAIL_OUT

2007-01-06 Thread Michael G Schwern
Adam Kennedy wrote: > Personally, I've always wanted a per-file bail_out as well, that can > just abort the current test script, rather than the entire testing process. > > Schwern? :) die.

Re: Comment about BAIL_OUT

2007-01-06 Thread Michael G Schwern
Adam Kennedy wrote: > Lately I find myself cheating a bit on the test naming as well, by just > calling the testing package t::lib::Test. > > That saves me one entire line :) Relying on . being in @INC makes my feet itch.

Re: Comment about BAIL_OUT

2007-01-06 Thread Adam Kennedy
Michael G Schwern wrote: Ovid wrote: However, if you use the '-s' switch to shuffle your tests and bailout is not first, then some tests will run until the BAIL_OUT is hit. This seems to violate the principle that tests should be able to run in any order without dependencies. It doesn't viola

Re: Comment about BAIL_OUT

2007-01-06 Thread Adam Kennedy
What I did instead is moved all the setup and teardown stuff into simple functions, plopped them into modules in t/lib/ and had each test do: use lib 't/lib'; use MakeMaker::Test; setup_foo(); END { teardown_foo(); } You can even get clever and pack the setup/te

Re: Comment about BAIL_OUT

2007-01-06 Thread A. Pagaltzis
* Eric Wilhelm <[EMAIL PROTECTED]> [2007-01-05 06:25]: > # from Greg Sabino Mullane > # on Thursday 04 January 2007 07:39 pm: > > > [1] I've never had a need for random tests myself. The only > > reason I break mine apart is to isolate testing various > > sub-systems, but I almost always end up ha

Re: Comment about BAIL_OUT

2007-01-05 Thread Michael Peters
Greg Sabino Mullane wrote: > Michael G Shwern wrote: >> Such a bother. >> ... >> You can even get clever and pack the setup/teardown calls into >> loading the module so you have even less code per script. >> >> Now each test runs independently and cleans itself up. > > True, but at the expense

Re: Comment about BAIL_OUT

2007-01-05 Thread Greg Sabino Mullane
Michael G Shwern wrote: > Such a bother. > ... > You can even get clever and pack the setup/teardown calls into > loading the module so you have even less code per script. > > Now each test runs independently and cleans itself up. True, but at the expense of having to run the startup and cleanup

Re: Comment about BAIL_OUT

2007-01-05 Thread Michael G Schwern
Ovid wrote: > However, if you use the '-s' switch to shuffle your tests and bailout > is not first, then some tests will run until the BAIL_OUT is hit. This > seems to violate the principle that tests should be able to run in any > order without dependencies. It doesn't violate the principle sinc

Re: Comment about BAIL_OUT

2007-01-05 Thread Michael G Schwern
Greg Sabino Mullane wrote: > [1] I've never had a need for random tests myself. The only reason I > break mine apart is to isolate testing various sub-systems, but I almost > always end up having some dependencies put into an early "00" file. I > also tend to a have a final "99" cleanup file. While

Re: Comment about BAIL_OUT

2007-01-05 Thread David Landgren
Greg Sabino Mullane wrote: [...] [1] I've never had a need for random tests myself. The only reason I break mine apart is to isolate testing various sub-systems, but I almost always end up having some dependencies put into an early "00" file. I also tend to a have a final "99" cleanup file. Whi

Re: Comment about BAIL_OUT

2007-01-04 Thread Joshua ben Jore
On 1/4/07, jerry gay <[EMAIL PROTECTED]> wrote: On 1/4/07, Andy Lester <[EMAIL PROTECTED]> wrote: > > On Jan 4, 2007, at 11:21 PM, Eric Wilhelm wrote: > > >> No. You either have tests that are ordered, or you don't. > > > > Stated as if it were some sort of immutable law of the universe! > > It

Re: Comment about BAIL_OUT

2007-01-04 Thread jerry gay
On 1/4/07, Andy Lester <[EMAIL PROTECTED]> wrote: On Jan 4, 2007, at 11:21 PM, Eric Wilhelm wrote: >> No. You either have tests that are ordered, or you don't. > > Stated as if it were some sort of immutable law of the universe! It is as far as Test::Harness goes. Test::Harness doesn't have

Re: Comment about BAIL_OUT

2007-01-04 Thread Andy Lester
On Jan 4, 2007, at 11:21 PM, Eric Wilhelm wrote: No. You either have tests that are ordered, or you don't. Stated as if it were some sort of immutable law of the universe! It is as far as Test::Harness goes. Test::Harness doesn't have any sort of idea of what connects tests together.

Re: Comment about BAIL_OUT

2007-01-04 Thread Eric Wilhelm
# from Andy Lester # on Thursday 04 January 2007 06:25 pm: >On Jan 4, 2007, at 8:17 PM, Eric Wilhelm wrote: >> Is it possible to shuffle all but the first tests? > >No. You either have tests that are ordered, or you don't. Stated as if it were some sort of immutable law of the universe! My poi

Re: Comment about BAIL_OUT

2007-01-04 Thread Greg Sabino Mullane
On Thu, 2007-01-04 at 13:34 -0800, Ovid wrote: > I guess the reason I have never used BAIL_OUT is because if I have a > bunch of tests failing, they fail quickly and I don't have to wait for > them :) I suppose it's not that big of a deal, but I noticed it this > evening and thought I would toss i

Re: Comment about BAIL_OUT

2007-01-04 Thread Ricardo SIGNES
* Ovid <[EMAIL PROTECTED]> [2007-01-04T16:34:31] > I guess the reason I have never used BAIL_OUT is because if I have a > bunch of tests failing, they fail quickly and I don't have to wait for > them :) I suppose it's not that big of a deal, but I noticed it this > evening and thought I would toss

Re: Comment about BAIL_OUT

2007-01-04 Thread Andy Lester
On Jan 4, 2007, at 8:17 PM, Eric Wilhelm wrote: # from Ovid # on Thursday 04 January 2007 01:34 pm: However, if you use the '-s' switch to shuffle your tests and bailout is not first, then some tests will run until the BAIL_OUT is hit. This seems to violate the principle that tests should be

Re: Comment about BAIL_OUT

2007-01-04 Thread Eric Wilhelm
# from Ovid # on Thursday 04 January 2007 01:34 pm: >However, if you use the '-s' switch to shuffle your tests and bailout >is not first, then some tests will run until the BAIL_OUT is hit. >  This seems to violate the principle that tests should be able to run > in any order without dependencies.