You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan U S <ma...@collab.net> on 2006/04/03 14:22:23 UTC

[PATCH] Add test for RevisionSet.sorted()

[[[
Add test for the RevisionSet.sorted() function.

* contrib/client-side/svnmerge_test.py
  (test_sorted): New function to test RevisionSet.sorted().
]]]


Re: [Svnmerge] [PATCH] Add test for RevisionSet.sorted()

Posted by Daniel Rall <dl...@collab.net>.
> Index: contrib/client-side/svnmerge_test.py
> ===================================================================
> --- contrib/client-side/svnmerge_test.py	(revision 19130)
> +++ contrib/client-side/svnmerge_test.py	(working copy)
> @@ -100,6 +100,12 @@
>          self.assertEqual(rs.normalized(), [(1,1), (3,6), (8,18)])
>          self.assertEqual(str(rs), "1,3-6,8-18")
>  
> +    def test_sorted(self):
> +        '''Test the sorted() function of the RevisionSet class.'''
> +        rs = svnmerge.RevisionSet("8-15,16-18, 4-6, 9, 18, 1-1, 3-3")
> +	self.assertEqual(rs.sorted(), [1, 3, 4, 5, 6, 8, 9, 10, 11, \
> +	                 12, 13, 14, 15, 16, 17, 18])
           ^

Spacing was off here because you used a tab.  I made the whitespace
adjustments, tweaked the quoting on the doc string, and committed as
r19133.  Thanks Madan!
-- 

Daniel Rall