Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: What is the largest number of tests you have created for a single project you have worked on?

by Tux (Abbot)
on Jun 11, 2010 at 05:52 UTC ( #844175=note: print w/replies, xml ) Need Help??


in reply to Re^2: What is the largest number of tests you have created for a single project you have worked on?
in thread What is the largest number of tests you have created for a single project you have worked on?

Then switch to a newer Test::More, and use - as I did in my example - to the use of done_testing () and you don't have to count or use plans no more.

done_testing () was first released in version 0.88 in May 2009, so it should be available to you too.

Once you're comfortable with this new way of writing tests, you can even spend more time writing them without worrying if you missed count. Next step could be writing subtests :)


Enjoy, Have FUN! H.Merijn
  • Comment on Re^3: What is the largest number of tests you have created for a single project you have worked on?
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://844175]
help
Chatterbox?
[Corion]: While working on WWW::Mechanize:: Chrome, I had the suspicion that AnyEvent was doing something wrong, but I was able to swap it out for Mojolicious and the error persisted.
[Corion]: Of course, the error was in my own code ;)
[marioroy]: Corion, start and start_child in MCE::Hobo::Manager return a MCE::Hobo object, whereas P::FM returns the PID. I can have it return the PID though. I tried Hobo::Manager with several P::FM modules, just changed P::FM to MCE::Hobo::Manager and it works.
[marioroy]: I also have a Hobo driver for Forklift allowing folks to use in multiple classes, no conflicts with one another. That's not possible for P::FM.
[Discipulus]: congrats marioroy!
[marioroy]: CORE::wait works well eventhough multiple instances or classes using Hobo::Manager.
[Corion]: marioroy: I'm not sure what the normal use for the PID is in P:FM, but I guess that most programs just ignore or log it
[Corion]: Oh, yes, programs could call wait $pid, but if your $pid is an object, then you could add a ->wait method to it and wait $pid would call that automatically "thanks" to indirect object notation
[marioroy]: Just documentation edits is all that remains. Hobo::Simple provides foreach and forseq with identifier capability -- all transparently supporting array, hash, file handle, and seq 1 .. N.
[marioroy]: Corion Regarding PID, that's great. So will leave it so compatible with MCE::Hobo. e.g. ->create returns a Hobo object. Folks can get ->pid from it. So, that's not a problem.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-05-26 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?