You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2007/06/08 08:22:21 UTC

[PATCH] Making 'Skip' to accept lambda function

Hi,
Few days back Malcom and I identified the problem with Skip not being 
able to accept callable lambda function.
This causes misunderstanding from the developers expecting Skip to 
behave like Xfail and after few lost hours understand that 'Skip' 
accepts a bool not a callable function.

I am attaching a patch in this regard. Once it is checked in I can work 
on making 'raise Skip' inside tests, to use 'Skip' marker in the test_list.

Now the problem is, '--list' switch to tests.

As we don't know the type(skip/no-skip) of Test till it executes and as 
'--list' is not a execution mode, this patch would mark all the Skip 
tests to be 'SKIP'.

It is similar to 'XFAIL'.

I am snipping the --list output of special_tests.py on my linux box, 
where this tests are not skipped.

<snip prior to applying the patch>
Test #  Mode   Test Description
------  -----  ----------------
  1            general symlink handling
  2            replace a normal file with a special file
  3            import and export a symlink
  4            'svn cp dir1 dir2' which contains a symlink
  5            replace a special file with a non-special file
  6            remove a symlink
  7            merge symlink into file
  8            merge file into symlink
  9            checkout a repository containing symlinks
 10     XFAIL  diff a symlink to a directory
 11            checkout repository with unknown special file type
 12            replace a special file with a directory
 13            symlink obstructs incoming delete
</snip>

<snip after applying the patch>
Test #  Mode   Test Description
------  -----  ----------------
  1     SKIP   general symlink handling
  2     SKIP   replace a normal file with a special file
  3     SKIP   import and export a symlink
  4     SKIP   'svn cp dir1 dir2' which contains a symlink
  5     SKIP   replace a special file with a non-special file
  6     SKIP   remove a symlink
  7     SKIP   merge symlink into file
  8     SKIP   merge file into symlink
  9            checkout a repository containing symlinks
 10     SKIP   diff a symlink to a directory
 11            checkout repository with unknown special file type
 12            replace a special file with a directory
 13     SKIP   symlink obstructs incoming delete
</snip>

Let me know your thoughts.

With regards
Kamesh Jayachandran

Re: [PATCH] Making 'Skip' to accept lambda function

Posted by Kamesh Jayachandran <ka...@collab.net>.
Daniel Rall wrote:
> On Fri, 08 Jun 2007, Kamesh Jayachandran wrote:
>
>   
>> Hi,
>> Few days back Malcom and I identified the problem with Skip not being 
>> able to accept callable lambda function.
>> This causes misunderstanding from the developers expecting Skip to 
>> behave like Xfail and after few lost hours understand that 'Skip' 
>> accepts a bool not a callable function.
>>
>> I am attaching a patch in this regard. Once it is checked in I can work 
>> on making 'raise Skip' inside tests, to use 'Skip' marker in the test_list.
>>     
>
> This sounds great!
>
> ...
>   
>> I am snipping the --list output of special_tests.py on my linux box, 
>> where this tests are not skipped.
>>
>> <snip prior to applying the patch>
>> Test #  Mode   Test Description
>> ------  -----  ----------------
>>  1            general symlink handling
>>  2            replace a normal file with a special file
>>  3            import and export a symlink
>>  4            'svn cp dir1 dir2' which contains a symlink
>>  5            replace a special file with a non-special file
>>  6            remove a symlink
>>  7            merge symlink into file
>>  8            merge file into symlink
>>  9            checkout a repository containing symlinks
>> 10     XFAIL  diff a symlink to a directory
>> 11            checkout repository with unknown special file type
>> 12            replace a special file with a directory
>> 13            symlink obstructs incoming delete
>> </snip>
>>
>> <snip after applying the patch>
>> Test #  Mode   Test Description
>> ------  -----  ----------------
>>  1     SKIP   general symlink handling
>>  2     SKIP   replace a normal file with a special file
>>  3     SKIP   import and export a symlink
>>  4     SKIP   'svn cp dir1 dir2' which contains a symlink
>>  5     SKIP   replace a special file with a non-special file
>>  6     SKIP   remove a symlink
>>  7     SKIP   merge symlink into file
>>  8     SKIP   merge file into symlink
>>  9            checkout a repository containing symlinks
>> 10     SKIP   diff a symlink to a directory
>> 11            checkout repository with unknown special file type
>> 12            replace a special file with a directory
>> 13     SKIP   symlink obstructs incoming delete
>> </snip>
>>
>> Let me know your thoughts.
>>     
>
> We need to maintain the existing behavior of 'test --list'.  Is there
> a way for the Skip predicate and the --list functionality to inter-op
> in a more friendly fashion?
>   

Fixed in r25357. Thanks to Malcom's change in r25296, now I could 
achieve this behaviour as well.


With regards
Kamesh Jayachandran

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

Re: [PATCH] Making 'Skip' to accept lambda function

Posted by Daniel Rall <dl...@collab.net>.
On Fri, 08 Jun 2007, Kamesh Jayachandran wrote:

> Hi,
> Few days back Malcom and I identified the problem with Skip not being 
> able to accept callable lambda function.
> This causes misunderstanding from the developers expecting Skip to 
> behave like Xfail and after few lost hours understand that 'Skip' 
> accepts a bool not a callable function.
> 
> I am attaching a patch in this regard. Once it is checked in I can work 
> on making 'raise Skip' inside tests, to use 'Skip' marker in the test_list.

This sounds great!

...
> I am snipping the --list output of special_tests.py on my linux box, 
> where this tests are not skipped.
> 
> <snip prior to applying the patch>
> Test #  Mode   Test Description
> ------  -----  ----------------
>  1            general symlink handling
>  2            replace a normal file with a special file
>  3            import and export a symlink
>  4            'svn cp dir1 dir2' which contains a symlink
>  5            replace a special file with a non-special file
>  6            remove a symlink
>  7            merge symlink into file
>  8            merge file into symlink
>  9            checkout a repository containing symlinks
> 10     XFAIL  diff a symlink to a directory
> 11            checkout repository with unknown special file type
> 12            replace a special file with a directory
> 13            symlink obstructs incoming delete
> </snip>
> 
> <snip after applying the patch>
> Test #  Mode   Test Description
> ------  -----  ----------------
>  1     SKIP   general symlink handling
>  2     SKIP   replace a normal file with a special file
>  3     SKIP   import and export a symlink
>  4     SKIP   'svn cp dir1 dir2' which contains a symlink
>  5     SKIP   replace a special file with a non-special file
>  6     SKIP   remove a symlink
>  7     SKIP   merge symlink into file
>  8     SKIP   merge file into symlink
>  9            checkout a repository containing symlinks
> 10     SKIP   diff a symlink to a directory
> 11            checkout repository with unknown special file type
> 12            replace a special file with a directory
> 13     SKIP   symlink obstructs incoming delete
> </snip>
> 
> Let me know your thoughts.

We need to maintain the existing behavior of 'test --list'.  Is there
a way for the Skip predicate and the --list functionality to inter-op
in a more friendly fashion?