³ò
¬ÕHc           @   s¶   d  d k  Z  d  d k Z e  i  d d d d d d d d g ƒ Z e  i  d d d d d d d d g ƒ Z e d d f d f e d d f d	 f g Z d
 e i f d „  ƒ  YZ d „  Z d S(   iÿÿÿÿNt   bitlisti   i    t   permutet   6201543t   1010011t	   unpermutet   1001101t   PermutationTestCasec           B   s   e  Z d  „  Z RS(   c      
   C   sâ   d GHxÖ t  D]Î \ } } y  | d d j o- | d i t d „  t | d ƒ ƒ ƒ } n? | d d j o- | d i t d „  t | d ƒ ƒ ƒ } n | t i d	 | ƒ j p t ‚ Wq t j
 o } | GHd
 GHq Xq Wd  S(   Ns   
Testing permutationsi   R   i    c         S   s
   t  |  ƒ S(    (   t   int(   t   x(    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pyt   <lambda>   s    i   R   c         S   s
   t  |  ƒ S(    (   R   (   R   (    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pyR	      s    t	   bitstrings   Permutation test failed(   t   permutationTestsR   t   mapt   listR   t	   BitVectort   AssertionErrort	   Exception(   t   selft   argst   expectedt   actualt   e(    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pyt   checkPermutations   s     $(   t   __name__t
   __module__R   (    (    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pyR      s   c         C   s   t  i t  i t |  ƒ g ƒ S(   N(   t   unittestt	   TestSuitet	   makeSuiteR   (   t   type(    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pyt   getTestSuites   s    (   R   R   t   bv1t   bv2R   t   TestCaseR   R   (    (    (    sC   /home/kak/BitVector/BitVector-1.4/TestBitVector/TestPermutations.pys   <module>   s   ''