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

Re^2: tests & logging

by andreas1234567 (Vicar)
on Oct 16, 2007 at 13:39 UTC ( #645169=note: print w/replies, xml ) Need Help??


in reply to Re: tests & logging
in thread tests & logging

Are all 40k tests in one file?
In that case I would seriously consider splitting the tests into smaller sets (i.e. files). Current modules on CPAN could serve as examples, e.g. a simple and easily understood one such as Number::Bytes::Human. Some test files contain just a handful tests/lines each:
[Number-Bytes-Human-0.07]# wc -l t/* 7 t/01use.t 42 t/02basic.t 27 t/03large.t 31 t/04base1000.t 14 t/05zero.t 15 t/06si.t 9 t/07unit.t 29 t/08base1M.t 137 t/10parse_args.t 17 t/20oo.t 8 t/90pod.t 8 t/98pod-coverage.t 344 total
Run all tests:
[Number-Bytes-Human-0.07]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/01use.............ok 1/1# Testing Number::Bytes::Human 0.07, Perl 5. +008005, /usr/bin/perl t/01use.............ok t/02basic...........ok t/03large...........ok 1/4number too large (>= 1024**10) at t/03large. +t line 26 t/03large...........ok t/04base1000........ok t/05zero............ok t/06si..............ok t/07unit............ok t/08base1M..........ok t/10parse_args......ok t/20oo..............ok t/90pod.............ok t/98pod-coverage....ok All tests successful. Files=12, Tests=128, 1 wallclock secs ( 0.89 cusr + 0.10 csys = 0.9 +9 CPU)
Run a single test:
[Number-Bytes-Human-0.07]# prove t/05zero.t t/05zero....ok All tests successful. Files=1, Tests=6, 0 wallclock secs ( 0.05 cusr + 0.00 csys = 0.05 C +PU)
--
Andreas

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://645169]
help
Chatterbox?
[choroba]: having problems with www.perlmonks.org again, removing the www helped
[choroba]: but pm-cb-g works well with it :) so it's only firefox (maybe one of the machines has problems and firefox somehow caches the connection?)
[choroba]: hm... seems ok again
[Corion]: At least back in the day Firefox (well, Netscape) used to cache the DNS itself because there was no OS API to asynchronously resolve names (?) Maybe that code still lives on

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2017-07-26 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (386 votes). Check out past polls.