Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
TAP subplan integrated
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael G Schwern  
View profile  
 More options May 30 2009, 8:02 pm
From: Michael G Schwern <schw...@pobox.com>
Date: Sat, 30 May 2009 17:02:47 -0700
Local: Sat, May 30 2009 8:02 pm
Subject: TAP subplan integrated
Now that a stable release is out I've pulled in Ovid's fork as a subplan
branch.  I stuck it in a branch on the general principle of keeping new
features separate to allow pushing a stable release out faster.  My recent
experience having to tear INSTALLHTML out of MakeMaker is to blame.

The code looks excellent.  Thank you Ovid and it looks like Adrian as well.

Now I will tear it apart.

I have two internal issues with the subplan branch.

Having to call finalize() on the child... it seems like it should just do that
when it gets destroyed.  Fortunately this is shielded from the user by the
subtest() method.  This bit of the docs is the red flag...

  If the child falls out of scope before C<finalize> is called, a failure
  diagnostic will be issued and the child is considered to have failed.

  No attempt to call methods on a child after C<finalize> is called is
  guaranteed to succeed.

[Special nit, I hate the throwback &foo syntax, modern Perl programmers
probably won't even know what it means, and much prefer foo() to indicate a
function call in the docs]

Which leads into issue #2: The child functionality feels like it should go
into a subclass (or role or whatever).  Though the subplan code is decidedly
non-invasive so its quite open to argument.

Externally, I have only one nit.  suite_passed() is a good idea, except...

$ perl -Ilib -wle 'use Test::More;  pass();  print "Yes" if
Test::More->builder->suite_passed'
ok 1
Yes
# Tests were run but no plan was declared and done_testing() was not seen.

For anything but a finalized child object it is a lie.  The fact that the
method name is past tense is the problem.  You can only know if the suite has
passed after all the testing is done.  Before that it can not be known and the
output is gibberish.  What you can know is if the suite is *currently
passing*.  That is, has anything happened up to this point to state that the
suite has failed?  This is useful information at any time in the life of a
builder object and its an oft requested feature.

The work done for suite_passed() can easily be subverted for is_passing()
which I will do now.

--
170. Not allowed to "defect" to OPFOR during training missions.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ovid  
View profile  
 More options Jun 4 2009, 8:05 am
From: Ovid <curtis....@gmail.com>
Date: Thu, 4 Jun 2009 13:05:09 +0100
Local: Thurs, Jun 4 2009 8:05 am
Subject: Re: [test-more-users] TAP subplan integrated
On Sun, May 31, 2009 at 1:02 AM, Michael G Schwern <schw...@pobox.com> wrote:

> Now that a stable release is out I've pulled in Ovid's fork as a subplan
> branch.  I stuck it in a branch on the general principle of keeping new
> features separate to allow pushing a stable release out faster.  My recent
> experience having to tear INSTALLHTML out of MakeMaker is to blame.

> The code looks excellent.  Thank you Ovid and it looks like Adrian as well.

> Now I will tear it apart.

> I have two internal issues with the subplan branch.

> Having to call finalize() on the child... it seems like it should just do that
> when it gets destroyed.  Fortunately this is shielded from the user by the
> subtest() method.  This bit of the docs is the red flag...

I'm struggling to recall exactly why I used a finalize() method
instead of DESTROY.  I believe it's Piers Cawley who argued for that,
but I can't be certain.  That being said, I'm quite comfortable with
this and the other things you've said.  Thanks for pushing forward on
this!

Cheers,
Ovid


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »