You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2007/12/11 00:39:48 UTC

Re: svn commit: r28378 - trunk/subversion/tests/cmdline

On Dec 10, 2007 1:42 PM,  <dl...@tigris.org> wrote:
> Author: dlr
> Date: Mon Dec 10 13:42:01 2007
> New Revision: 28378
>
> Log:
> Add test for issue #3039, "'update -N' on a path to be deleted
> corrupts working copy".
>
> * subversion/tests/cmdline/depth_tests.py
>   (depthy_update_above_dir_to_be_deleted): Add new test case.
>   (test_list): Add new test case to list, currently XFAIL.
>
> Found by: Eric Miller

Nice test, Dan!  I like how you abstracted out the repeated elements;
for once I can actually read the test and convince myself that it's
correct.

Do you think it's worth also testing the variants where "A" is the
target of the update?



> +  for depth in sbox_for_depth.keys():
> +    wc_dir = sbox_for_depth[depth].wc_dir
> +    (expected_output_func, expected_disk, expected_status_func) = \
> +      expected_trees_for_depth[depth]
> +    #print depth
> +    svntest.actions.run_and_verify_update(wc_dir,
> +                                          expected_output_func(wc_dir),
> +                                          expected_disk,
> +                                          expected_status_func(wc_dir),
> +                                          None, None, None, None, None,
> +                                          False,
> +                                          "--depth=%s" % depth, wc_dir)

As a tiny python style thing here, I might have written

for depth, sbox in sbox_for_depth.iteritems():

... though maybe we never quite decided that requiring 2.2 for the
test suite is OK.

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r28378 - trunk/subversion/tests/cmdline

Posted by David Glasser <gl...@davidglasser.net>.
On Dec 10, 2007 8:24 PM, Daniel Rall <dl...@collab.net> wrote:
> On Mon, 10 Dec 2007, David Glasser wrote:
> > As a tiny python style thing here, I might have written
> >
> > for depth, sbox in sbox_for_depth.iteritems():
> >
> > ... though maybe we never quite decided that requiring 2.2 for the
> > test suite is OK.
>
> Yah, good tip.  INSTALL says the test suite only requires Python 2.0 on Unix.
> Is this something that folks are wanting to change?

I suggested this a couple of months ago and nobody disagreed.

http://svn.haxx.se/dev/archive-2007-10/0867.shtml

I suggest that the next time somebody actually wants to use a 2.2
feature in the test suite, they use it and adjust INSTALL.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r28378 - trunk/subversion/tests/cmdline

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 10 Dec 2007, David Glasser wrote:

> On Dec 10, 2007 1:42 PM,  <dl...@tigris.org> wrote:
> > Author: dlr
> > Date: Mon Dec 10 13:42:01 2007
> > New Revision: 28378
> >
> > Log:
> > Add test for issue #3039, "'update -N' on a path to be deleted
> > corrupts working copy".
> >
> > * subversion/tests/cmdline/depth_tests.py
> >   (depthy_update_above_dir_to_be_deleted): Add new test case.
> >   (test_list): Add new test case to list, currently XFAIL.
> >
> > Found by: Eric Miller
> 
> Nice test, Dan!  I like how you abstracted out the repeated elements;
> for once I can actually read the test and convince myself that it's
> correct.
 
Thanks, I had a good shell script to follow.  ;-)

> Do you think it's worth also testing the variants where "A" is the
> target of the update?
 
Yes.  I'd been thinking about that myself...
 
> > +  for depth in sbox_for_depth.keys():
> > +    wc_dir = sbox_for_depth[depth].wc_dir
> > +    (expected_output_func, expected_disk, expected_status_func) = \
> > +      expected_trees_for_depth[depth]
> > +    #print depth
> > +    svntest.actions.run_and_verify_update(wc_dir,
> > +                                          expected_output_func(wc_dir),
> > +                                          expected_disk,
> > +                                          expected_status_func(wc_dir),
> > +                                          None, None, None, None, None,
> > +                                          False,
> > +                                          "--depth=%s" % depth, wc_dir)
> 
> As a tiny python style thing here, I might have written
> 
> for depth, sbox in sbox_for_depth.iteritems():
> 
> ... though maybe we never quite decided that requiring 2.2 for the
> test suite is OK.

Yah, good tip.  INSTALL says the test suite only requires Python 2.0 on Unix.
Is this something that folks are wanting to change?