perlunit-users Mailing List for PerlUnit
Status: Beta
Brought to you by:
mca1001
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
(6) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(1) |
2003 |
Jan
(14) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(10) |
Oct
(20) |
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(3) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
(4) |
Jun
(6) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Desilets, A. <Ala...@nr...> - 2011-09-09 13:14:59
|
I have a tests JobQueueTest, which tests a queue that can be shared between processes. In the tear_down() of JobQueueTest, I want to make sure that the test did not leave the queue in a lock state (clients that use a JobQueue are not supposed to ever be able to end up with that kind of locked state). sub tear_down { my ($self) = @_; # # If a test leaves the queue in a locked state, it's probably a sign # of an unbalanced lock/unlock pair. # $self->assert(!defined($self->{queue}->_already_locked_by_me()), "This test left the queue in a locked state.\n". "This is probably a sign that there is an unbalanced lock/unlock pair somewhere in the code."); } The problem is that this assertion ends up masking any failure that may happen in the course of carrying out the test. For example, if test itself carries out an assertion that fails with error message X, then instead of seing error X, I will see the above error message regarding the lock state. This is very misleading and prevents me from knowing the actual root of the problem. Is there a way around this? For example, in my tear_down(), could I check to see if some exceptions have already been raised in this test, and if so, not assert for consistency of the instance under test? Thx |
From: Andrey A. <aa...@ma...> - 2011-06-11 06:35:09
|
Hello, I'm glad Test::Unit is under development again - it is a great module. Please, take a look at https://rt.cpan.org/Public/Bug/Display.html?id=6758 This significantly slows down execution of test suits. It is noticeable even on small suits, please try to comment debug() call out , and you will see. Thanks. 10.06.2011 22:46, Matthew Astley wrote: > On Thu, May 19, 2011 at 08:50:03PM +0100, Matthew Astley wrote: > >> My next step is to rescue the code from CVS into Git, since I'm >> tooled up for this at work at the moment. > > I did that, and revised the website a little. You may clone from > SourceForge or Github, details are on http://perlunit.sourceforge.net/ > > I then fixed the release process and made development releases. > 0.25_1325 should fix the outstanding cpantesters fails and the > TestRunner.pl exit code. There are also some old fixes. > http://search.cpan.org/~mcast/Test-Unit-0.25_1325/ > http://search.cpan.org/src/MCAST/Test-Unit-0.25_1325/ChangeLog > > This doesn't address all outstanding bugs, but it does get the visible > (dist) tests back to a green bar on all OS/Perl combinations so far, > http://matrix.cpantesters.org/?dist=Test-Unit+0.25_1325 > > > In addition to bugs in the shipped code, there is also a problem with > my CPAN permissions - I don't have permission for all the Test::Unit* > modules in the dist, because PAUSE treats them separately and we > didn't know this back then. > > Adam has fixed the modules he can, and I think I have contact details > for Christian. > > > Anyway, I wanted to let you know things are still happening slowly. > -- Andrey |
From: Matthew A. <mc...@us...> - 2011-06-10 18:46:47
|
On Thu, May 19, 2011 at 08:50:03PM +0100, Matthew Astley wrote: > My next step is to rescue the code from CVS into Git, since I'm > tooled up for this at work at the moment. I did that, and revised the website a little. You may clone from SourceForge or Github, details are on http://perlunit.sourceforge.net/ I then fixed the release process and made development releases. 0.25_1325 should fix the outstanding cpantesters fails and the TestRunner.pl exit code. There are also some old fixes. http://search.cpan.org/~mcast/Test-Unit-0.25_1325/ http://search.cpan.org/src/MCAST/Test-Unit-0.25_1325/ChangeLog This doesn't address all outstanding bugs, but it does get the visible (dist) tests back to a green bar on all OS/Perl combinations so far, http://matrix.cpantesters.org/?dist=Test-Unit+0.25_1325 In addition to bugs in the shipped code, there is also a problem with my CPAN permissions - I don't have permission for all the Test::Unit* modules in the dist, because PAUSE treats them separately and we didn't know this back then. Adam has fixed the modules he can, and I think I have contact details for Christian. Anyway, I wanted to let you know things are still happening slowly. -- Matthew |
From: Robert S. <rsc...@no...> - 2011-05-25 19:47:27
|
Hi Matt, On 05/19/2011 03:50 PM, Matthew Astley wrote: > On Wed, May 18, 2011 at 09:39:44AM -0400, Robert Schweikert wrote: > >> Using the unit test framework for some Perl work and am running into >> a bit of trouble. > > Hi Robert, > > I'm glad to hear it's still useful. > >> When a test fails [...] I get an appropriate error message such as >> "not ok ERROR test_...." the exit status of the test is still 0. > > I agree that Perlunit has this all "wrong" in v0.25 - test runners > should exit with a non-zero return code. None of them do. > > Unfortunately this used to be implemented in the T:U:TestRunner module > but was downgraded from exit to die, then again to just return, > because it was causing trouble for other code. I assume this was the > GUI runner, which expects to continue running after the tests have > finished. > > There's no test for the text-mode runners' exit code... > > I added a bug for this, > https://sourceforge.net/tracker/?func=detail&aid=3304750&group_id=2653&atid=102653 > Thanks for filing the bug. > >> -> perl myTest.t >> ..... >> ERROR >> .... >> -> echo $? >> 0 > > While there are no test runners in v0.25 which will return the correct > exit code, you may be able to get the result you need by having one > t/run_tests.t execute all your test classes under HarnessUnit, and run > prove(1) to call this in the usual way. > > This way you will be able to use prove's exit code, which *is* correct. Thanks for this tip. I was not aware of prove. I tested this and changed my test setup to use prove to run the tests. > > Your invocation "perl myTest.t" above suggests you have started down > this road. Does that myTest.t emit TAP (test anything protocol)? No, I am not using TAP. Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rsc...@no... rsc...@ca... 781-464-8147 |
From: Matthew A. <mc...@us...> - 2011-05-19 20:08:42
|
On Wed, May 18, 2011 at 09:39:44AM -0400, Robert Schweikert wrote: > Using the unit test framework for some Perl work and am running into > a bit of trouble. Hi Robert, I'm glad to hear it's still useful. > When a test fails [...] I get an appropriate error message such as > "not ok ERROR test_...." the exit status of the test is still 0. I agree that Perlunit has this all "wrong" in v0.25 - test runners should exit with a non-zero return code. None of them do. Unfortunately this used to be implemented in the T:U:TestRunner module but was downgraded from exit to die, then again to just return, because it was causing trouble for other code. I assume this was the GUI runner, which expects to continue running after the tests have finished. There's no test for the text-mode runners' exit code... I added a bug for this, https://sourceforge.net/tracker/?func=detail&aid=3304750&group_id=2653&atid=102653 > -> perl myTest.t > ..... > ERROR > .... > -> echo $? > 0 While there are no test runners in v0.25 which will return the correct exit code, you may be able to get the result you need by having one t/run_tests.t execute all your test classes under HarnessUnit, and run prove(1) to call this in the usual way. This way you will be able to use prove's exit code, which *is* correct. Your invocation "perl myTest.t" above suggests you have started down this road. Does that myTest.t emit TAP (test anything protocol)? The other workaround is to write your own test runner which exits according to the result of $testrunner->start() ...which is what I did some time ago. You may find the script at http://www.t8o.org/~mca1001/cgi/viewcvs/bin/testrunner.pl useful (I know my viewcvs is broken, but the data is still there). I have for a long time intended to release that testrunner.pl with Perlunit, but in the meantime I got a Life & a heap of more urgent things to do... > This is not good as I would like make and rpm package creation to > fail when a test fails. How do I get the unit test framework to set > the exit status to something other than 0 when an ERROR occurs? I hope two workarounds and a vague promise of a better future is enough for now. My next step is to rescue the code from CVS into Git, since I'm tooled up for this at work at the moment. This is hampered by the usual problem of putting multiple sets of related code into one CVS repo, and Git not supporting that, but I should have it fixed up in a few days if nothing else pops up. Thanks for waking the project up, -- Matthew |
From: Robert S. <rsc...@no...> - 2011-05-18 13:39:59
|
Hi, Using the unit test framework for some Perl work and am running into a bit of trouble. When a test fails, i.e. an assert is triggered and I get an appropriate error message such as "not ok ERROR test_...." the exit status of the test is still 0. -> perl myTest.t ..... ERROR .... -> echo $? 0 This is not good as I would like make and rpm package creation to fail when a test fails. How do I get the unit test framework to set the exit status to something other than 0 when an ERROR occurs? Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rsc...@no... rsc...@ca... 781-464-8147 |
From: Andrey A. <aa...@ma...> - 2009-01-30 15:30:51
|
Hi, This mailing list is not really responsive last time. Most of your questions concern general Perl-on-Windows problems. Good place to start is perldoc perlwin32 (http://perldoc.perl.org/perlwin32.html). I guess, there should be other FAQ's and mailing lists on that topic. I'd started to use Test::Unit in Windows environment, but switched to Unix few years ago. Test::Unit itself is platform-independent. There is TkTestRunner but I used to use command-line version. Good luck! Erlis Vidal wrote: > Hi guys! > > > > I need your help. I’ve been searching on the net and I haven’t succeed > in my search. I start developing in perl (Windows environment) I’m a TDD > developer, I need to test my perl programs more than anything. I’m > trying to start installing the PerlUnit but I really don’t know where to > start. I downloaded the .tar.gz but I don’t know what to do with them. > Usually I use the Perl Package Manager to install new packages but in > this case I’m lost. > > > > Is there any documentation that shown a newbie like me in perl how to > start (a kind of quick start guide)? > > > > Is the GTesterRunner a GUI for the PerlUnit or is just another framework? > > > > I need help, I just want to test my perl programs, which in this moment > everything is I broken every time I type a character and I don’t realize > in the moment! > > > > Now I understand how TDD born... the necessity to test languages like > perl (small talk) > > > > Sincerly > > Erlis > > *********************************************************************** > > This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s). > Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint. > > Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses > destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > > > ------------------------------------------------------------------------ > > _______________________________________________ > Perlunit-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perlunit-users -- Андрей. |
From: Erlis V. <Erl...@ra...> - 2009-01-30 14:46:31
|
Hi guys! I need your help. I've been searching on the net and I haven't succeed in my search. I start developing in perl (Windows environment) I'm a TDD developer, I need to test my perl programs more than anything. I'm trying to start installing the PerlUnit but I really don't know where to start. I downloaded the .tar.gz but I don't know what to do with them. Usually I use the Perl Package Manager to install new packages but in this case I'm lost. Is there any documentation that shown a newbie like me in perl how to start (a kind of quick start guide)? Is the GTesterRunner a GUI for the PerlUnit or is just another framework? I need help, I just want to test my perl programs, which in this moment everything is I broken every time I type a character and I don't realize in the moment! Now I understand how TDD born... the necessity to test languages like perl (small talk) Sincerly Erlis *********************************************************************** This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s). Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint. Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint. |
From: Anders J. <AJo...@nv...> - 2008-12-17 02:17:10
|
I propose the following patch. The effect is to propagate the provided message (if any) when one comparison value is undefined, such that the point of failure in the test case is easier to locate. Similar code exists elsewhere in Test::Unit::Assert (e.g. $assert_subs{'str_equals'}). Comments? Thanks, &ers -----begin Test-Unit-0.25-anders1.patch----- diff -Naur Test-Unit-0.25/lib/Test/Unit/Assert.pm Test-Unit-0.25-anders1/lib/Test/Unit/Assert.pm --- Test-Unit-0.25/lib/Test/Unit/Assert.pm 2005-10-15 13:25:28.000000000 -0700 +++ Test-Unit-0.25-anders1/lib/Test/Unit/Assert.pm 2008-12-16 17:44:28.071447000 -0800 @@ -124,7 +124,7 @@ # pass } elsif (defined($args[0]) xor defined($args[1])) { - $self->fail('one arg was not defined'); + $self->fail(@args>2 ? join('', @args[2..$#args]) : 'one arg was not defined'); } elsif (is_numeric($args[0])) { $self->assert_num_equals(@args); diff -Naur Test-Unit-0.25/t/tlib/AssertTest.pm Test-Unit-0.25-anders1/t/tlib/AssertTest.pm --- Test-Unit-0.25/t/tlib/AssertTest.pm 2005-10-15 14:19:18.000000000 -0700 +++ Test-Unit-0.25-anders1/t/tlib/AssertTest.pm 2008-12-16 17:44:03.032513000 -0800 @@ -25,6 +25,8 @@ # A false-negative that burned me; problem with is_numeric # Test must be all on one line [ __LINE__, sub { shift->assert_equals("start o:MyClass=HASH(0x1404343f0) | any o:MyClass=HASH(0x1404343f0) e:start | any o:MyClass=HASH(0x1404343f0) e:in", "start o: e: | any o:start e: | any o:in e:"); } ], + "explanation" => [ __LINE__, sub { shift->assert_equals(0, undef, "explanation") }], + "one arg was not defined" => [ __LINE__, sub { shift->assert_equals(0, undef) }], ); } -----end Test-Unit-0.25-anders1.patch----- ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- |
From: Vyacheslav K. <ubu...@ya...> - 2008-08-28 08:58:38
|
Hi All! I'm new with Perl and Unit testing and I need some useful documentation and examples to start. Could anyone help me? Thanks. |
From: Matthew A. <mc...@us...> - 2007-10-26 16:29:45
|
Hi folks, I'm having a little tidy up of the Sourceforge project... With great thanks for the work they've done in the years gone by, I removed all the other developers & admins: adamspiers ba22a cayte clemburg jefritz mca-gdl (an old user of mine) pdcawley zhon This isn't a power grab, folks are welcome to join or re-join the project. For now it seems more honest to admit that it's just me. I'm quite keen to migrate from CVS to Subversion. Apart from using shinier tools, this would allow a cleanup of the source tree. I'll give this a while for people to offer comments and ponder their existing working copies, but other than the trouble of migrating (which I've sampled at work) I can't see any particular reason to stick with CVS. I enabled the project's Wiki to try it out. The default is "protected" mode, but that didn't sound very useful so I switched it to "public". I think you'll need a Sourceforge or Wikispaces login to edit. http://perlunit.wiki.sourceforge.net/ I also updated the trove categorisation and switched off the Doc Manager system. Code changes later, bye for now. -- Matthew -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |
From: Wagner B. <ber...@pr...> - 2007-06-26 07:56:04
|
On Fri, 25 May 2007 06:12:19 -0700 There was this post by Adrian Howard containing this example of the TestSuite: { package BlahTest; use base qw( Test::Unit::TestCase ); sub test_blah { my ( $self ) = @_; my $x = [ {'hello'=> 1 }, 1 ]; my $y = [ {'hello'=> 1 }, 2 ]; $self->assert_deep_equals( $x, $y ); } } { package AllTests; use base qw(Test::Unit::TestSuite); sub name { 'Testing assert_deep_equals' } sub include_tests { 'BlahTest' }; } use Test::Unit::TestRunner; Test::Unit::TestRunner->new->start( 'AllTests' ); Unfortunately, when I run this, I get another output than you describe, namely: .F Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) !!!FAILURES!!! Test Results: Run: 1 Failures: 1 Errors: 0 There was 1 failure: 1) warning(Test::Unit::TestSuite::_warning) Test::Unit::ExceptionFailure: Class AllTests is not a Test::Unit::TestCase How do I run this TestSuite? Thank you Bernhard |
From: Desilets, A. <Ala...@nr...> - 2007-05-25 14:10:28
|
> Hi Alain, >=20 > Apologies for the belated response. Been in bed most of this=20 > week with evil lurgy and have been avoiding e-mail - and=20 > computers in general :-) Sorry to hear about that. Hope you are better now. >=20 > On 23 May 2007, at 21:06, Desilets, Alain wrote: >=20 > > I finally got round to trying assert_deep_equals().=20 > Unfortunately, I=20 > > don't get the kind of nice diagnostic message you mentioned in your=20 > > message of a week ago. Attached is a sample test program.=20 > When I run=20 > > it, all I get is the following error message: > [snip] >=20 > You're not getting the diagnostic because you gave your own =20 > description string for the failure. Leave it out and you'll get the =20 > diagnostics. OK, thx. I had assumed that assert_deep_equals() behaved like all other asserts in PerlUnit, i.e. the error message passed to it got prepended to whatever additional messages the assert might itself generate. I will look into the code for assert_deep_equals() and see if I can change it to behave that way (and submit the change to the PerlUnit team). I kind of like that behaviour, because it allows me to make my error messages more specific to what I am testing. As it turns out, I implemented my own version of something like assert_deep_equals(). Basically, it serializes the two structures using a PrettyPrinter that I found on the web, then does a string comparison between the two. >=20 > As an aside - you should be passing class names as 'Strings' nor =20 > BareWords. It's better style and will save you the no warnings/=20 > warnings.=20 Hum... I was sure I had tried that at some point (long time ago) and that it didn't work. But I'll try again, thx. |
From: Adrian H. <ad...@qu...> - 2007-05-25 13:12:10
|
Hi Alain, Apologies for the belated response. Been in bed most of this week with evil lurgy and have been avoiding e-mail - and computers in general :-) On 23 May 2007, at 21:06, Desilets, Alain wrote: > I finally got round to trying assert_deep_equals(). Unfortunately, I > don't get the kind of nice diagnostic message you mentioned in your > message of a week ago. Attached is a sample test program. When I > run it, > all I get is the following error message: [snip] You're not getting the diagnostic because you gave your own description string for the failure. Leave it out and you'll get the diagnostics. As an aside - you should be passing class names as 'Strings' nor BareWords. It's better style and will save you the no warnings/ warnings. You can also take advantage of the fact that packages are lexically scoped to avoid having to remember to switch back to the main package, inherit the new() function in your test case, and use the include_tests() method in your test suite. Rolling all of this together would get you: ---- { package BlahTest; use base qw( Test::Unit::TestCase ); sub test_blah { my ( $self ) = @_; my $x = [ {'hello'=> 1 }, 1 ]; my $y = [ {'hello'=> 1 }, 2 ]; $self->assert_deep_equals( $x, $y ); } } { package AllTests; use base qw(Test::Unit::TestSuite); sub name { 'Testing assert_deep_equals' } sub include_tests { 'BlahTest' }; } use Test::Unit::TestRunner; Test::Unit::TestRunner->new->start( 'AllTests' ); ---- which will give you ---- .F Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) !!!FAILURES!!! Test Results: Run: 1, Failures: 1, Errors: 0 There was 1 failure: 1) BlahTest.pm:13 - test_blah(BlahTest) Structures begin differing at: $a->[1] = '1' $b->[1] = '2' Test was not successful. ---- and - just for fun - here's a version in the Test::Class style: ---- { package BlahTest; use base qw( Test::Class ); use Test::More; sub show_how_is_deeply_works : Test { my $x = [ {'hello'=> 1 }, 1 ]; my $y = [ {'hello'=> 1 }, 2 ]; is_deeply $x, $y; } } Test::Class->runtests; ---- which would give you: ---- 1..1 not ok 1 - show how is deeply works # Failed test 'show how is deeply works' # at BlahTest.pm line 13. # (in BlahTest->show_how_is_deeply_works) # Structures begin differing at: # $got->[1] = '1' # $expected->[1] = '2' # Looks like you failed 1 test of 1. ---- Cheers, Adrian |
From: Desilets, A. <Ala...@nr...> - 2007-05-23 20:09:27
|
I finally got round to trying assert_deep_equals(). Unfortunately, I don't get the kind of nice diagnostic message you mentioned in your message of a week ago. Attached is a sample test program. When I run it, all I get is the following error message: ----=20 !!!FAILURES!!! Test Results: Run: 1, Failures: 1, Errors: 0 There was 1 failure: 1) test_blah: Test failed Test was not successful. ---- Which is not very helpful for finding where in the structure the difference was found. Am I missing some important configuration for my test harness? Thx. Alain > -----Original Message----- > From: Desilets, Alain=20 > Sent: May 16, 2007 7:35 PM > To: 'Adrian Howard'; per...@li... > Cc: Farley, Benoit > Subject: RE: [Perlunit-users] Comparing deeply nested data structures. >=20 > Great, thanks Adrian. That sounds exactly like what we're looking for. >=20 > Alain > =20 >=20 > > -----Original Message----- > > From: Adrian Howard [mailto:ad...@qu...] > > Sent: May 16, 2007 7:26 PM > > To: per...@li...; Desilets, Alain > > Cc: Farley, Benoit > > Subject: Re: [Perlunit-users] Comparing deeply nested data=20 > structures. > >=20 > >=20 > > On 16 May 2007, at 18:17, Desilets, Alain wrote: > > [snip] > > > I want to easily compare the output of that method to > > expected output, > > > and if the two differ, get a good diagnostic message that=20 > describes=20 > > > exactly how the two differ. > > [snip] > > > Is there something in Perl that would allow me to do this? > >=20 > > In Test::Unit there's assert_deep_equals() - for example: > >=20 > > sub test_using_assert_deep_equals { > > my $self =3D shift; > > $self->assert_deep_equals( > > [ { hello =3D>1}, { world =3D> 1 } ], > > [ { hello =3D>1}, { earth =3D> 1 } ] > > ); > > } > >=20 > > that gives you a diagnostic like > >=20 > > 1) /Users/adrianh/Desktop/test.pl:53 - test_using_assert_deep_equals > > (Comparison::Test) > > Structures begin differing at: > > $a->[1]{earth} =3D Does not exist > > $b->[1]{earth} =3D '1' > >=20 > > > I stumbled across cmp_deeply(), but I can't figure out how > > to use it.=20 > > > It's part of a testing framework different from PerlUnit, > > and I can't > > > seem to be able to use it without running it inside that > > other testing > > > framework (which I don't have time to learn). > >=20 > > It's not that hard to shim the more popular Test::Builder based=20 > > "assertion" modules into Test::Unit. The=20 > off-the-top-of-my-head greasy=20 > > hack of: > >=20 > > { package Test::Unit::MyTestCase; > > use base qw( Test::Unit::TestCase ); > > use Test::Builder '0.7'; > > use Carp qw( confess ); > >=20 > > sub assert_using { > > my ( $self, $test_coderef ) =3D @_; > > my $builder =3D Test::Builder->new; > > $builder->reset; > > $builder->plan( 'no_plan' ); > > my $output =3D ''; > > open my $output_fh, '>', \$output or die; > > $builder->output( $output_fh ); > > $builder->failure_output( $output_fh ); > > $builder->todo_output( $output_fh ); > > $self->assert( $test_coderef->(), $output ); > > } > > } > >=20 > > would allow you to do things like: > >=20 > > { package Comparison::Test; > > use base qw( Test::Unit::MyTestCase ); > >=20 > > use Test::More; # provides is_deeply > >=20 > > sub test_using_is_deeply { > > my $self =3D shift; > > $self->assert_using( sub { > > is_deeply [ { hello =3D>1}, { world =3D> 1 } ], > > [ { hello =3D>1}, { earth =3D> 1 } ]; > > } ); > > } > >=20 > > use Test::Deep; # provides cmp_deeply > >=20 > > sub test_using_cmp_deeply { > > my $self =3D shift; > > $self->assert_using( sub { > > cmp_deeply( [ { hello =3D>1}, { world =3D> 1 } ], > > [ { hello =3D>1}, { earth =3D> 1 } ] > > ); > > } ); > > } > > } > >=20 > > giving you diagnostics like > >=20 > > 2) /private/var/tmp/folders.502/Cleanup At Startup/ > > test-201050484.793.pl:21 - test_using_cmp_deeply(Comparison::Test) > > not ok 1 > > # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/=20 > > test-201050484.793.pl line 43. > > # Comparing hash keys of $data->[1] > > # Missing: 'earth' > > # Extra: 'world' > >=20 > > 3) /private/var/tmp/folders.502/Cleanup At Startup/ > > test-201050484.793.pl:21 - test_using_is_deeply(Comparison::Test) > > not ok 1 > > # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/=20 > > test-201050484.793.pl line 33. > > # Structures begin differing at: > > # $got->[1]{earth} =3D Does not exist > > # $expected->[1]{earth} =3D '1' > >=20 > > However if you're going to be using a bunch of Test::Builder based=20 > > assertions it might be easier to use Test::Group or <bias=20 > > class=3D"author"> Test::Class </bias> instead. > >=20 > > Cheers, > >=20 > > Adrian > >=20 > >=20 >=20 |
From: Desilets, A. <Ala...@nr...> - 2007-05-16 23:35:07
|
Great, thanks Adrian. That sounds exactly like what we're looking for. Alain =20 > -----Original Message----- > From: Adrian Howard [mailto:ad...@qu...]=20 > Sent: May 16, 2007 7:26 PM > To: per...@li...; Desilets, Alain > Cc: Farley, Benoit > Subject: Re: [Perlunit-users] Comparing deeply nested data structures. >=20 >=20 > On 16 May 2007, at 18:17, Desilets, Alain wrote: > [snip] > > I want to easily compare the output of that method to=20 > expected output,=20 > > and if the two differ, get a good diagnostic message that describes=20 > > exactly how the two differ. > [snip] > > Is there something in Perl that would allow me to do this? >=20 > In Test::Unit there's assert_deep_equals() - for example: >=20 > sub test_using_assert_deep_equals { > my $self =3D shift; > $self->assert_deep_equals( > [ { hello =3D>1}, { world =3D> 1 } ], > [ { hello =3D>1}, { earth =3D> 1 } ] > ); > } >=20 > that gives you a diagnostic like >=20 > 1) /Users/adrianh/Desktop/test.pl:53 - test_using_assert_deep_equals > (Comparison::Test) > Structures begin differing at: > $a->[1]{earth} =3D Does not exist > $b->[1]{earth} =3D '1' >=20 > > I stumbled across cmp_deeply(), but I can't figure out how=20 > to use it.=20 > > It's part of a testing framework different from PerlUnit,=20 > and I can't=20 > > seem to be able to use it without running it inside that=20 > other testing=20 > > framework (which I don't have time to learn). >=20 > It's not that hard to shim the more popular Test::Builder=20 > based "assertion" modules into Test::Unit. The=20 > off-the-top-of-my-head greasy hack of: >=20 > { package Test::Unit::MyTestCase; > use base qw( Test::Unit::TestCase ); > use Test::Builder '0.7'; > use Carp qw( confess ); >=20 > sub assert_using { > my ( $self, $test_coderef ) =3D @_; > my $builder =3D Test::Builder->new; > $builder->reset; > $builder->plan( 'no_plan' ); > my $output =3D ''; > open my $output_fh, '>', \$output or die; > $builder->output( $output_fh ); > $builder->failure_output( $output_fh ); > $builder->todo_output( $output_fh ); > $self->assert( $test_coderef->(), $output ); > } > } >=20 > would allow you to do things like: >=20 > { package Comparison::Test; > use base qw( Test::Unit::MyTestCase ); >=20 > use Test::More; # provides is_deeply >=20 > sub test_using_is_deeply { > my $self =3D shift; > $self->assert_using( sub { > is_deeply [ { hello =3D>1}, { world =3D> 1 } ], > [ { hello =3D>1}, { earth =3D> 1 } ]; > } ); > } >=20 > use Test::Deep; # provides cmp_deeply >=20 > sub test_using_cmp_deeply { > my $self =3D shift; > $self->assert_using( sub { > cmp_deeply( [ { hello =3D>1}, { world =3D> 1 } ], > [ { hello =3D>1}, { earth =3D> 1 } ] > ); > } ); > } > } >=20 > giving you diagnostics like >=20 > 2) /private/var/tmp/folders.502/Cleanup At Startup/ > test-201050484.793.pl:21 - test_using_cmp_deeply(Comparison::Test) > not ok 1 > # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/=20 > test-201050484.793.pl line 43. > # Comparing hash keys of $data->[1] > # Missing: 'earth' > # Extra: 'world' >=20 > 3) /private/var/tmp/folders.502/Cleanup At Startup/ > test-201050484.793.pl:21 - test_using_is_deeply(Comparison::Test) > not ok 1 > # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/=20 > test-201050484.793.pl line 33. > # Structures begin differing at: > # $got->[1]{earth} =3D Does not exist > # $expected->[1]{earth} =3D '1' >=20 > However if you're going to be using a bunch of Test::Builder=20 > based assertions it might be easier to use Test::Group or=20 > <bias class=3D"author"> Test::Class </bias> instead. >=20 > Cheers, >=20 > Adrian >=20 >=20 |
From: Adrian H. <ad...@qu...> - 2007-05-16 23:26:53
|
On 16 May 2007, at 18:17, Desilets, Alain wrote: [snip] > I want to easily compare the output of that method to expected > output, and if the two differ, get a good diagnostic message that > describes exactly how the two differ. [snip] > Is there something in Perl that would allow me to do this? In Test::Unit there's assert_deep_equals() - for example: sub test_using_assert_deep_equals { my $self = shift; $self->assert_deep_equals( [ { hello =>1}, { world => 1 } ], [ { hello =>1}, { earth => 1 } ] ); } that gives you a diagnostic like 1) /Users/adrianh/Desktop/test.pl:53 - test_using_assert_deep_equals (Comparison::Test) Structures begin differing at: $a->[1]{earth} = Does not exist $b->[1]{earth} = '1' > I stumbled across cmp_deeply(), but I can't figure out how to use > it. It's part of a testing framework different from PerlUnit, and I > can't seem to be able to use it without running it inside that > other testing framework (which I don't have time to learn). It's not that hard to shim the more popular Test::Builder based "assertion" modules into Test::Unit. The off-the-top-of-my-head greasy hack of: { package Test::Unit::MyTestCase; use base qw( Test::Unit::TestCase ); use Test::Builder '0.7'; use Carp qw( confess ); sub assert_using { my ( $self, $test_coderef ) = @_; my $builder = Test::Builder->new; $builder->reset; $builder->plan( 'no_plan' ); my $output = ''; open my $output_fh, '>', \$output or die; $builder->output( $output_fh ); $builder->failure_output( $output_fh ); $builder->todo_output( $output_fh ); $self->assert( $test_coderef->(), $output ); } } would allow you to do things like: { package Comparison::Test; use base qw( Test::Unit::MyTestCase ); use Test::More; # provides is_deeply sub test_using_is_deeply { my $self = shift; $self->assert_using( sub { is_deeply [ { hello =>1}, { world => 1 } ], [ { hello =>1}, { earth => 1 } ]; } ); } use Test::Deep; # provides cmp_deeply sub test_using_cmp_deeply { my $self = shift; $self->assert_using( sub { cmp_deeply( [ { hello =>1}, { world => 1 } ], [ { hello =>1}, { earth => 1 } ] ); } ); } } giving you diagnostics like 2) /private/var/tmp/folders.502/Cleanup At Startup/ test-201050484.793.pl:21 - test_using_cmp_deeply(Comparison::Test) not ok 1 # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/ test-201050484.793.pl line 43. # Comparing hash keys of $data->[1] # Missing: 'earth' # Extra: 'world' 3) /private/var/tmp/folders.502/Cleanup At Startup/ test-201050484.793.pl:21 - test_using_is_deeply(Comparison::Test) not ok 1 # Failed test at /private/var/tmp/folders.502/Cleanup At Startup/ test-201050484.793.pl line 33. # Structures begin differing at: # $got->[1]{earth} = Does not exist # $expected->[1]{earth} = '1' However if you're going to be using a bunch of Test::Builder based assertions it might be easier to use Test::Group or <bias class="author"> Test::Class </bias> instead. Cheers, Adrian |
From: Desilets, A. <Ala...@nr...> - 2007-05-16 17:17:21
|
I am writing some PerlUnit tests, and I am testing a method that returns = a complex data structure (a reference to an array whose elements are = references to hashtables). I want to easily compare the output of that method to expected output, = and if the two differ, get a good diagnostic message that describes = exactly how the two differ.=20 For example, if I compare: [{'hello'=3D>1}, {'world'=3D>1}] with [{'hello'=3D>1}, {'earth'=3D>1}] I would like the error message to look something like this: The two arrays differed at element 1: Got: {'world'=3D>1} Expected: {'earth'=3D>1} The hashes had different keys Got Keys: ['world'] Expected Keys: ['earth'] Is there something in Perl that would allow me to do this? I stumbled across cmp_deeply(), but I can't figure out how to use it. = It's part of a testing framework different from PerlUnit, and I can't = seem to be able to use it without running it inside that other testing = framework (which I don't have time to learn). Thx. ---- Alain D=E9silets, National Research Council of Canada Chair, WikiSym 2007 2007 International Symposium on Wikis Wikis at Work in the World: Open, Organic, Participatory Media for the 21st Century=20 http://www.wikisym.org/ws2007/ |
From: Matthew A. <mc...@us...> - 2007-05-03 21:09:48
|
On Tue, May 01, 2007 at 10:45:22AM +0100, stefan kruger wrote: > is there any simple way of achieving this: [...] > # This is wrong in so many different ways, and only intended to convey what > # I'd like to do > $self->assert_dies($obj_to_test->some_method('bobba', 2), 'my_die_message'); Yes, I have a bolt-on assert method like this in my local T:U:TestCase subclass. This is something I really must tidy up and add to the project, but in the mean time the source is below - under the current Perl Artistic licence if such a thing applies to so little code. If you just have one test class you can stuff it in as an extra method; or you can make a subclass and use that for your test; or you could hack your local install because hopefully the next release will contain the same code anyway. > In other words - I want to check that a specific object method dies > with a specific message. It's a common thing to want! With the code below present, I would do $self->assert_dies(qr/my_dir_message/, sub { $obj_to_test->some_method('bobba', 2) }, "other helpful fail-text"); The second arg is an anonymous subroutine so die'ing (or not) doesn't happen until after the assert_dies method starts to run. > There are examples included using ExceptionChecker.pm and > WillDie.pm, but I can't seem to achieve the above. Thanks for reminding me, I had forgotten about these. Matthew #8-) -- =head2 assert_dies( qr/message regex/, @coderefs, $descr]) Run each piece of code. Assert that each one dies, and that the resulting error message matches the regex. Extra description C<$descr> is optional. =cut sub assert_dies { my ($self, $regex, @coderef) = @_; # Need to include caller in failure message, since the builtin # line number reporting is no help my @caller = caller(); my $caller = "caller at $caller[1] line $caller[2]"; if (@coderef > 1 && !ref($coderef[-1])) { # Last item isn't code, take it as an extra piece of message $caller .= ", ".pop(@coderef); } $self->fail("arg1 not Regexp from $caller") unless ref($regex) eq 'Regexp'; $self->fail("Bad args (no coderefs) from $caller") unless @coderef; $self->fail("Bad args (coderefs aren't) from $caller") if grep {ref($_) ne 'CODE'} @coderef; for (my $i=0; $i<@coderef; $i++) { eval { $coderef[$i]->(); }; my $err = $@; my $which = ""; $which = join "", "[", $i+1, " of ", scalar @coderef, "]" if @coderef > 1; $self->fail("Code$which did not die, $caller") unless $err; $self->assert_matches($regex, $err, "Code$which, $caller:\n Died with '$err'\n which didn't match $regex"); } } # The self-tests for this code are the thing that desperately needs # tidying up before the code escapes... sub McaTestCaseTest::test_assert_dies { my $self = shift; # Run our assertion so it should pass, check it ran my $flag = 0; $self->assert_dies(qr/dodo style/, sub { $flag = "captured"; die "dodo style"; }); $self->assert_str_equals("captured", $flag); ### Use the builtin Test::Unit::Assert to check the assertion fails: # doesn't die $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( qr/wibble/, sub { return 1; }); }); # wrong args $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( "foo", sub { return 1; }); }); $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( qr/foo/, sub { return 1; }, "This is not code", "Could be a message?"); }); # multi coderef, second has wrong message $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( qr/wibble/, sub { die "wibble" }, sub { die "spong" }); }); # multi coderef, third doesn't die $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( qr/wibble/, sub { die "eek wibble bonk" }, sub { die "boo wibble spong" }, sub { return 1; }); }); # old bug check $self->assert_raises('Test::Unit::Failure', sub { $self->assert_dies( qr/caller/i, sub { die "some other thing" } ); }); # Check the error messages are useful # Working so far, so can use the method under test! $self->assert_dies( qr/Code\[2 of 2\]/, sub { $self->assert_dies( qr/butter/, sub { die "butterfingers" }, sub { die "aiee" }); }, sub { $self->assert_dies( qr/oops/, sub { die "oops" }, sub { return 1 }); }); $self->assert_dies( qr/vital/, sub { $self->assert_dies( qr/foo/, sub { die "unhelpful message" }, "vital piece of info"); }); } |
From: stefan k. <ste...@fu...> - 2007-05-01 09:45:30
|
Hi All, is there any simple way of achieving this: sub test_foo { my $self = shift; my $obj_to_test = ObjToTest->new('yadda', 1); # This is wrong in so many different ways, and only intended to convey what # I'd like to do $self->assert_dies($obj_to_test->some_method('bobba', 2), 'my_die_message'); } In other words - I want to check that a specific object method dies with a specific message. There are examples included using ExceptionChecker.pm and WillDie.pm, but I can't seem to achieve the above. Thanks in advance for any pointers stefan -- Stefan Kruger Future Publishing Limited (registered company number 2008885) is a wholly owned subsidiary of Future plc (registered company number 3757874), both of which are incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please reply to this email and then delete it. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print. |
From: Roger D. <rog...@gl...> - 2006-06-22 08:29:23
|
Attached are a set of working tests and the script that invokes them. At 21/06/2006 18:42:16, per...@li... wrote: >Greetings, > >Is there an example usage of Test::Unit::Setup someone could refer me >to? I'm afraid I might be using it the wrong way. > >Here is how I've got it in a sample setup: > >----------------------------------- >package MITestSuite; > >use base qw(Test::Unit::Setup Test::Unit::TestSuite); > >sub name{ 'MITestSuite'}; > >sub include_tests{ >qw( >SiteMgrTestSuite >PubSysTestSuite >); >} >------------------------------------ > >This outputs: > >Suite setup >E >Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) > >!!!FAILURES!!! >Test Results: >Run: 0, Failures: 0, Errors: 1 > >There was 1 error: >Use of uninitialized value in string at >/home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. >Use of uninitialized value in string at >/home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. >1) /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm:15 - >Can't call method "run" on an undefined value >Can't locate object method "annotations" via package "MITestSuite" at >/home/shilton/shared/my_perl/lib/Test/Unit/TestRunner.pm line 107. > > >I see that the set_up() method is being called successfully, but it's >dying on line 15 because $self->{_fTest} is undefined, and it looks >like it's not being innited in the new() method, because the param >used to populate _fTest is not passed in all the way up the stack. > >Am I using Test::Unit::Setup incorrectly? > >P.S. I've tried a number of different 'use base()' param lists. Each >had different behavior, but none what I was looking for. > >Thanks for any help. > >-- >Steven Hilton <msh...@gm...> ><http://mshiltonj.com/> > >"It is the duty of the patriot to protect >his country from its government." -- Thomas Paine > >All the advantages of Linux Managed Hosting--Without the Cost and Risk! >Fully trained technicians. The highest number of Red Hat certifications in >the hosting industry. Fanatical Support. Click to learn more >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 >_______________________________________________ >Perlunit-users mailing list >Per...@li... >https://lists.sourceforge.net/lists/listinfo/perlunit-users > |
From: Tom H. <hum...@gm...> - 2006-06-21 20:34:21
|
Today's Topics: 1. List active? (Steven Hilton) -- yes it is, but just barely. You can find more help at places like perlmonger and experts-exchange.com http://www.perlmonks.com http://www.experts-exchange.com/Programming/Programming_Languages/Perl/ 2. using Test::Unit::Setup (Steven Hilton) Can you post your source code?? Where are you overriding? It might help to take closer look at Test::Unit::Setup: package Test::Unit::Setup; use strict; use base qw(Test::Unit::Decorator); sub run { my $self = shift(); my($result) = @_; my $protectable = sub { $self->set_up(); $self->basic_run($result); $self->tear_down(); }; $result->run_protected($self, $protectable); } # Sets up the fixture. Override to set up additional fixture # state. sub set_up { print "Suite setup\n"; } # Tears down the fixture. Override to tear down the additional # fixture state. sub tear_down { print "Suite teardown\n"; } 1; __END__ And here is Test::Unit::Decorator: package Test::Unit::Decorator; use strict; use base qw(Test::Unit::Test); sub new { my $class = shift; my ($fTest) = @_; return bless { _fTest => $fTest }, $class; } sub basic_run { my $self = shift; my ($result) = @_; $self->{_fTest}->run($result); # IS THIS WHERE YOU HAVE ERROR? } sub count_test_cases() { my $self = shift; return $self->{_fTest}->count_test_cases(); } sub run { my $self = shift; my ($result) = @_; $self->basic_run($result); } sub to_string { my $self = shift; "$self->{_fTest}"; } sub get_test { my $self = shift; return $self->{_fTest}; } 1; __END__ -- Thomas J. Humphrey, MS EE Gaming Consultant Reno, Nevada hum...@gm... |
From: Steven H. <msh...@gm...> - 2006-06-21 17:42:22
|
Greetings, Is there an example usage of Test::Unit::Setup someone could refer me to? I'm afraid I might be using it the wrong way. Here is how I've got it in a sample setup: ----------------------------------- package MITestSuite; use base qw(Test::Unit::Setup Test::Unit::TestSuite); sub name{ 'MITestSuite'}; sub include_tests{ qw( SiteMgrTestSuite PubSysTestSuite ); } ------------------------------------ This outputs: Suite setup E Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) !!!FAILURES!!! Test Results: Run: 0, Failures: 0, Errors: 1 There was 1 error: Use of uninitialized value in string at /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. Use of uninitialized value in string at /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30. 1) /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm:15 - Can't call method "run" on an undefined value Can't locate object method "annotations" via package "MITestSuite" at /home/shilton/shared/my_perl/lib/Test/Unit/TestRunner.pm line 107. I see that the set_up() method is being called successfully, but it's dying on line 15 because $self->{_fTest} is undefined, and it looks like it's not being innited in the new() method, because the param used to populate _fTest is not passed in all the way up the stack. Am I using Test::Unit::Setup incorrectly? P.S. I've tried a number of different 'use base()' param lists. Each had different behavior, but none what I was looking for. Thanks for any help. -- Steven Hilton <msh...@gm...> <http://mshiltonj.com/> "It is the duty of the patriot to protect his country from its government." -- Thomas Paine |
From: Steven H. <msh...@gm...> - 2006-06-21 15:37:16
|
Testing... Is this list active? -- Steven Hilton <msh...@gm...> <http://mshiltonj.com/> "It is the duty of the patriot to protect his country from its government." -- Thomas Paine |
From: Andrey A. <aa...@ma...> - 2006-06-07 13:48:07
|
RD> I've created a script much like TkRunner.pl, TestRunner etc, to run RD> individual test suites. Is there a way I can run an individual test RD> from within a test-suite in a similar manner? I have commented out string # our @TESTS = qw(); in every test unit. If I need to run individual test I put it in array and uncomment. It's not so convinient but it works. Also I have a reminder in TestSuite to be sure to run whole suite afterwards: === opendir(DIR, './tu') or die $!; @tests = grep { /(?<!AllTests)\.pm$/ } readdir(DIR); closedir(DIR); foreach my $tfile (@tests){ open(F, '<', "./tu/$tfile") or die $!; my ($our_tests) = grep { m/our\s+\@TESTS/ } <F>; close(F); die "Explicit test list found in $tfile\n" if $our_tests and $our_tests !~ /^\s*#/; } === Andrey. |