Is the "missing" subroutine an indication that nobody else bothers to test for such conditions? Or just an oversight by the module author?

I think the best answer here is "design choice". Test::More is meant to be a core set of tests that handle the day-to-day basic Stuff You Gotta Do. So you can do the basics: this did what I expected, or something different; this is the same as that, as I expected, or it's different, as I expected. The "deeply" versions just amp up that basic test a little: like the thing I expected, or not.

Test::Exception, Test::LongString, Test::Tester, Test::WWW::Simple, and on and on, just add a little more specific testing power in specific areas.

Another possibility is to put Test::Exception in t/lib and distribute it with your code. That way you get the win of getting the test you want without requiring the user to install it.

Yet another is to check for whether Test::Exception is available on the machiine where the module's being installed, and skip the tests if it isn't. This is the way I generally prefer to handle such things; I use this for POD tests, which are useful to me, but maybe not so much to the person installing this module later.


In reply to Re: too much testing? by pemungkah
in thread too much testing? by geektron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.