ó
ŒwÛjc           @   s>  d  d l  Z  d  d l m Z d  d l m Z m Z m Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z
 d  d l m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d f  d „  ƒ  YZ d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e  j f d „  ƒ  YZ e d „ Z e d k r:e d e ƒ n  d S(   iÿÿÿÿN(   t   test_support(   t   proxyt   reft   WeakSet(   t	   randranget   shufflet   Fooc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR      s   t	   SomeClassc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s   | |  _  d  S(   N(   t   value(   t   selfR
   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   __init__   s    c         C   s,   t  | ƒ t  |  ƒ k r t S| j |  j k S(   N(   t   typet   FalseR
   (   R   t   other(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   __eq__   s    c         C   s   |  j  | ƒ S(   N(   R   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   __ne__   s    c         C   s   t  t |  j f ƒ S(   N(   t   hashR	   R
   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   __hash__   s    (   R   R   R   R   R   R   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR	      s   			t   RefCyclec           B   s   e  Z d  „  Z RS(   c         C   s   |  |  _  d  S(   N(   t   cycle(   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR   "   s    (   R   R   R   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR   !   s   t   TestWeakSetc           B   s”  e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d  „  Z" d! „  Z# d" „  Z$ d# „  Z% d$ „  Z& d% „  Z' d& „  Z( d' „  Z) d( „  Z* d) „  Z+ d* „  Z, d+ „  Z- RS(,   c         C   sT  g  d D] } t  | ƒ ^ q |  _ g  d D] } t  | ƒ ^ q) |  _ g  t j D] } t  | ƒ ^ qN |  _ g  d D] } t  | ƒ ^ qp |  _ g  d D] } t  | ƒ ^ q’ |  _ g  d	 D] } t  | ƒ ^ q´ |  _ t	 |  j ƒ |  _
 t	 |  j ƒ |  _ t	 |  j ƒ |  _ t	 |  j ƒ |  _ t j |  j ƒ |  _ t  d
 ƒ |  _ t	 |  j g ƒ |  _ d  S(   Nt   at   bt   ct   xt   yt   zt   abt   abcdet   deft   F(   R   R   R   (   R   R   R   (   R	   t   itemst   items2t   stringt   ascii_letterst   letterst   ab_itemst   abcde_itemst	   def_itemsR   t
   ab_weaksett   abcde_weaksett   def_weaksett   st   dictt   fromkeyst   dt   objt   fs(   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   setUp'   s    ""%"""c         C   s_   t  t ƒ } xL t  t ƒ D]> } | d k s | j d ƒ r@ q n  |  j | | d | ƒ q Wd  S(   Nt
   test_c_apit   _s   WeakSet missing method (   t   dirR   t   sett
   startswitht   assertIn(   R   t   weaksetmethodst   method(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_methods7   s    c         C   s   |  j  t t g  d ƒ d  S(   Ni   (   t   assertRaisest	   TypeErrorR   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_new_or_init?   s    c         C   s^   |  j  t |  j ƒ t |  j ƒ ƒ |  j  t |  j ƒ d ƒ |  ` |  j  t |  j ƒ d ƒ d  S(   Ni   i    (   t   assertEqualt   lenR,   R/   R1   R0   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_lenB   s    "c         C   s‚   x3 |  j  D]( } |  j | |  j k | |  j k ƒ q
 W|  j d |  j ƒ |  j |  j |  j ƒ |  ` |  j t d ƒ |  j ƒ d  S(   Ni   R    (	   R%   R?   R,   R/   t   assertNotInR8   R0   R1   R	   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_containsH   s    &c         C   s  |  j  j |  j ƒ } x? |  j D]4 } |  j | | k | |  j k pO | |  j k ƒ q W|  j |  j  t |  j ƒ ƒ |  j t | ƒ t ƒ |  j	 t
 |  j  j g  g ƒ xd t t t j t t f D]J } t |  j |  j ƒ } | |  j ƒ } |  j |  j  j | ƒ | ƒ ~ q¾ W|  j t | ƒ t |  j ƒ t |  j ƒ ƒ |  j j ƒ  t j ƒ  |  j t | ƒ t |  j ƒ t |  j ƒ ƒ d  S(   N(   R,   t   unionR"   R%   R?   R/   R   R!   R   R<   R=   R6   t	   frozensetR-   R.   t   listt   tupleR@   t   popt   gct   collect(   R   t   uR   t   CR   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt
   test_unionQ   s    2,
c         C   sY   |  j  j |  j ƒ } |  j |  j  t |  j ƒ B| ƒ |  j |  j  t |  j ƒ B| ƒ d  S(   N(   R,   RD   R"   R?   R6   RE   (   R   t   i(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_orb   s     c         C   s<  t  |  j ƒ } | j |  j ƒ } x? |  j D]4 } |  j | | k | |  j k o[ | |  j k ƒ q+ W|  j | t  |  j ƒ ƒ |  j t | ƒ t  ƒ xN t t t j	 t
 t f D]4 } t  g  ƒ } |  j | j | |  j ƒ ƒ | ƒ q« W|  j t | ƒ t |  j ƒ ƒ |  j j ƒ  t j ƒ  |  j t | ƒ t |  j ƒ ƒ d  S(   N(   R   R%   t   intersectionR"   R?   R   R6   RE   R-   R.   RF   RG   R!   R@   RH   RI   RJ   (   R   R,   RN   R   RL   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_intersectiong   s    2&
c         C   sI   |  j  |  j j t |  j ƒ ƒ ƒ |  j  |  j j t |  j ƒ ƒ ƒ d  S(   N(   t
   assertTrueR,   t
   isdisjointR   R"   R%   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_isdisjointv   s    "c         C   sY   |  j  j |  j ƒ } |  j |  j  t |  j ƒ @| ƒ |  j |  j  t |  j ƒ @| ƒ d  S(   N(   R,   RP   R"   R?   R6   RE   (   R   RN   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_andz   s     c         C   s©   |  j  j |  j ƒ } x? |  j D]4 } |  j | | k | |  j k oO | |  j k ƒ q W|  j |  j  t |  j ƒ ƒ |  j t | ƒ t ƒ |  j	 t
 |  j  j g  g ƒ d  S(   N(   R,   t
   differenceR"   R%   R?   R/   R   R!   R   R<   R=   (   R   RN   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_difference   s    2c         C   sY   |  j  j |  j ƒ } |  j |  j  t |  j ƒ | ƒ |  j |  j  t |  j ƒ | ƒ d  S(   N(   R,   RV   R"   R?   R6   RE   (   R   RN   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_sub‡   s     c         C   s  |  j  j |  j ƒ } x= |  j D]2 } |  j | | k | |  j k | |  j k Aƒ q W|  j |  j  t |  j ƒ ƒ |  j t | ƒ t ƒ |  j	 t
 |  j  j g  g ƒ |  j t | ƒ t |  j ƒ t |  j ƒ ƒ |  j j ƒ  t j ƒ  |  j t | ƒ t |  j ƒ t |  j ƒ ƒ d  S(   N(   R,   t   symmetric_differenceR"   R%   R?   R/   R   R!   R   R<   R=   R@   RH   RI   RJ   (   R   RN   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_symmetric_differenceŒ   s    0,
c         C   sY   |  j  j |  j ƒ } |  j |  j  t |  j ƒ A| ƒ |  j |  j  t |  j ƒ A| ƒ d  S(   N(   R,   RY   R"   R?   R6   RE   (   R   RN   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_xor˜   s     c         C   sñ   |  j  |  j |  j k ƒ |  j  |  j |  j k ƒ |  j  |  j |  j k ƒ |  j |  j |  j k ƒ |  j |  j |  j k ƒ |  j  t d ƒ j d ƒ ƒ |  j  t d ƒ j d ƒ ƒ |  j t d ƒ j d ƒ ƒ |  j t d ƒ j d ƒ ƒ d  S(   NR   t   abct   cbs(   RR   R)   R*   t   assertFalseR+   R6   t   issubsett
   issuperset(   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_sub_and_super�   s    c         C   sh   |  j  |  j |  j k  ƒ |  j |  j |  j k  ƒ |  j |  j |  j k  ƒ |  j t ƒ  t ƒ  k  ƒ d  S(   N(   RR   R)   R*   R^   R+   R   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_lt¨   s    c         C   sh   |  j  |  j |  j k ƒ |  j |  j |  j k ƒ |  j |  j |  j k ƒ |  j t ƒ  t ƒ  k ƒ d  S(   N(   RR   R*   R)   R^   R+   R   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_gt®   s    c         C   sU   t  d „  t d ƒ Dƒ ƒ } x2 | D]* } | | _ | | _ t  | g ƒ | _ q# Wd  S(   Nc         s   s   |  ] } t  ƒ  Vq d  S(   N(   R   (   t   .0RN   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pys	   <genexpr>¶   s    iè  (   R   t   rangeR   t   subR6   (   R   R,   t   elem(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_gc´   s
    		c         C   sp   d t  f d „  ƒ  Y} | ƒ  } t ƒ  } | j | ƒ |  j | | ƒ | j | ƒ | j | ƒ | j | ƒ d  S(   Nt   Hc           B   s   e  Z d  „  Z RS(   c         S   s   t  t |  ƒ d @ƒ S(   Niÿÿÿ(   t   intt   id(   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR   ¿   s    (   R   R   R   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyRi   ¾   s   (   R   R6   t   addR8   t   removet   discard(   R   Ri   R,   t   f(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_subclass_with_custom_hash¼   s    		c         C   sˆ   t  ƒ  } | j |  j ƒ |  j | |  j ƒ | j |  j ƒ |  j | t  |  j ƒ ƒ |  j t | j | d ƒ |  j t | j d ƒ d  S(   Ni   i   (   R   R   R!   R?   R,   R"   R<   R=   (   R   R,   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_initÉ   s    	c         C   s;   t  |  j ƒ } t  | ƒ } |  j t | ƒ t | ƒ ƒ d  S(   N(   R   R!   t   assertNotEqualRk   (   R   R,   t   t(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_constructor_identityÒ   s    c         C   s   |  j  t t |  j ƒ d  S(   N(   R<   R=   R   R,   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_hash×   s    c         C   sC   |  j  j ƒ  |  j |  j  t g  ƒ ƒ |  j t |  j  ƒ d ƒ d  S(   Ni    (   R,   t   clearR?   R   R@   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt
   test_clearÚ   s    c         C   sE   |  j  j ƒ  } |  j |  j  | ƒ |  j t |  j  ƒ t | ƒ ƒ d  S(   N(   R,   t   copyR?   Rr   Rk   (   R   t   dup(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_copyß   s    c         C   sÜ   t  d ƒ } |  j j | ƒ |  j | |  j ƒ |  j j ƒ  } |  j j | ƒ |  j |  j | ƒ |  j t |  j j g  ƒ |  j j t	 ƒ  ƒ |  j
 t |  j ƒ d k ƒ |  j j |  j ƒ |  j
 t |  j ƒ d k ƒ d  S(   Nt   Qi   (   R	   R,   Rl   R8   Rx   R?   R<   R=   R1   R   RR   R@   R0   (   R   R   Ry   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_addä   s    c         C   se   t  d ƒ } |  j j | ƒ |  j | |  j ƒ |  j t |  j j | ƒ |  j t |  j j g  ƒ d  S(   NR   (   R	   R,   Rm   RB   R<   t   KeyErrorR=   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_removeñ   s
    c         C   si   t  d ƒ t  d ƒ } } |  j j | ƒ |  j | |  j ƒ |  j j | ƒ |  j t |  j j g  ƒ d  S(   NR   R{   (   R	   R,   Rn   RB   R<   R=   (   R   R   t   q(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_discardø   s
    c         C   s\   x? t  t |  j ƒ ƒ D]( } |  j j ƒ  } |  j | |  j ƒ q W|  j t |  j j ƒ d  S(   N(   Re   R@   R,   RH   RB   R<   R}   (   R   RN   Rg   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_popÿ   s    c         C   ss   |  j  j |  j ƒ } |  j | d  ƒ x+ |  j |  j D] } |  j | |  j  ƒ q6 W|  j t |  j  j g  g ƒ d  S(   N(	   R,   t   updateR"   R?   t   NoneR!   R8   R<   R=   (   R   t   retvalR   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_update  s
    c         C   sK   |  j  j t |  j ƒ ƒ x+ |  j |  j D] } |  j | |  j  ƒ q* Wd  S(   N(   R,   R‚   R6   R"   R!   R8   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_update_set  s    c         C   sJ   |  j  t |  j ƒ O_  x+ |  j |  j D] } |  j | |  j  ƒ q) Wd  S(   N(   R,   R6   R"   R!   R8   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_ior  s    c         C   s§   |  j  j |  j ƒ } |  j | d  ƒ x_ |  j |  j D]M } | |  j k rp | |  j k rp |  j | |  j  ƒ q6 |  j | |  j  ƒ q6 W|  j t	 |  j  j g  g ƒ d  S(   N(
   R,   t   intersection_updateR"   R?   Rƒ   R!   R8   RB   R<   R=   (   R   R„   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_intersection_update  s    c         C   s~   |  j  t |  j ƒ M_  x_ |  j |  j D]M } | |  j k rc | |  j k rc |  j | |  j  ƒ q) |  j | |  j  ƒ q) Wd  S(   N(   R,   R6   R"   R!   R8   RB   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_iand   s
    c         C   sÃ   |  j  j |  j ƒ } |  j | d  ƒ x_ |  j |  j D]M } | |  j k rp | |  j k rp |  j | |  j  ƒ q6 |  j | |  j  ƒ q6 W|  j t	 |  j  j g  g ƒ |  j t	 |  j  j
 g  g ƒ d  S(   N(   R,   t   difference_updateR"   R?   Rƒ   R!   R8   RB   R<   R=   t   symmetric_difference_update(   R   R„   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_difference_update(  s    c         C   s~   |  j  t |  j ƒ 8_  x_ |  j |  j D]M } | |  j k rc | |  j k rc |  j | |  j  ƒ q) |  j | |  j  ƒ q) Wd  S(   N(   R,   R6   R"   R!   R8   RB   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_isub3  s
    c         C   s¥   |  j  j |  j ƒ } |  j | d  ƒ x] |  j |  j D]K } | |  j k | |  j k Arn |  j | |  j  ƒ q6 |  j | |  j  ƒ q6 W|  j t	 |  j  j g  g ƒ d  S(   N(
   R,   RŒ   R"   R?   Rƒ   R!   R8   RB   R<   R=   (   R   R„   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt    test_symmetric_difference_update;  s    c         C   s|   |  j  t |  j ƒ N_  x] |  j |  j D]K } | |  j k | |  j k Ara |  j | |  j  ƒ q) |  j | |  j  ƒ q) Wd  S(   N(   R,   R6   R"   R!   R8   RB   (   R   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_ixorE  s
    c         C   s–   |  j  j ƒ  } | | O} |  j | |  j  ƒ | | M} |  j | |  j  ƒ | | 8} |  j | t ƒ  ƒ |  j  j ƒ  } | | N} |  j | t ƒ  ƒ d  S(   N(   R,   Rx   R?   R   (   R   Rs   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_inplace_on_selfM  s    



c         C   s¯   |  j  |  j |  j k ƒ |  j  |  j t |  j ƒ k ƒ |  j |  j t |  j ƒ k ƒ |  j |  j t |  j ƒ k ƒ |  j |  j t |  j ƒ k ƒ |  j |  j d k ƒ d  S(   Ni   (   RR   R,   R   R!   R^   R6   RF   RG   (   R   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_eqY  s    c         C   sH   |  j  |  j t |  j ƒ k ƒ t ƒ  } t ƒ  } |  j | | k ƒ d  S(   N(   RR   R,   R6   R!   R   R^   (   R   t   s1t   s2(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_neb  s    		c         C   s§   g  d D] } t  | ƒ ^ q } t | ƒ } t | ƒ } t | ƒ | d =t j ƒ  |  j t t | ƒ ƒ t | ƒ t | ƒ d g ƒ ~ |  j	 t | ƒ t | ƒ ƒ d  S(   NR   R   R   iÿÿÿÿi   (   R   R   R   (
   R	   R   t   itert   nextRI   RJ   R8   R@   RF   R?   (   R   R   R!   R,   t   it(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt!   test_weak_destroy_while_iteratingh  s    

2c      	      sO  g  t  j D] } t | ƒ ^ q
 ‰  t ˆ  ƒ ‰ t j ‡  ‡ f d †  ƒ } | ƒ  � } |  j | ˆ ƒ Wd  QX| ƒ  � } |  j t ˆ j	 | ƒ Wd  QX|  j | ˆ ƒ | ƒ  � } ˆ j
 | ƒ Wd  QX|  j | ˆ ƒ ˆ j ƒ  } | ƒ  � } ˆ j | ƒ Wd  QX|  j t ˆ ƒ t | ƒ ƒ | ƒ  � } ˆ j ƒ  Wd  QX|  j t ˆ ƒ d ƒ d  S(   Nc          3   sO   zA t  ˆ ƒ }  t |  ƒ t t ˆ  j ƒ  ƒ ƒ } t j ƒ  | VWd  d  }  Xd  S(   N(   R–   R—   R	   t   strRH   RI   RJ   Rƒ   (   R˜   RK   (   R!   R,   (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   testcontext|  s    

	i    (   R#   R$   R	   R   t
   contextlibt   contextmanagerRB   R<   R}   Rm   Rl   R8   Rx   R‚   R?   R@   Rv   (   R   R   R›   RK   Rs   (    (   R!   R,   s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt,   test_weak_destroy_and_mutate_while_iteratingx  s$    "c         C   s¸   d } g  t  | ƒ D] } t ƒ  ^ q } t | ƒ } ~ t | ƒ } y t | ƒ Wn t k
 rd n Xt j ƒ  t | ƒ } ~ t j ƒ  t | ƒ } |  j	 | d ƒ |  j
 | d ƒ d  S(   Ni   i    i   (   i    i   (   Re   R   R   R–   R—   t   StopIterationRI   RJ   R@   R8   R?   (   R   t   NRN   R!   R,   R˜   t   n1t   n2(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_len_cycles˜  s     "

c   	      C   s  |  j  t j t j ƒ  Œ x÷ t d d ƒ D]æ } d } t j d ƒ t j | | | ƒ g  t | ƒ D] } t ƒ  ^ qb } t | ƒ } ~ t | ƒ } y t	 | ƒ Wn t
 k
 r³ n Xt | ƒ } ~ t | ƒ } |  j | d ƒ |  j | | ƒ |  j | d ƒ |  j | | ƒ q) Wd  S(   Ni   id   i   i    (   t
   addCleanupRI   t   set_thresholdt   get_thresholdRe   RJ   R   R   R–   R—   RŸ   R@   t   assertGreaterEqualt   assertLessEqual(	   R   t   thR    RN   R!   R,   R˜   R¡   R¢   (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   test_len_race«  s(    "(.   R   R   R2   R;   R>   RA   RC   RM   RO   RQ   RT   RU   RW   RX   RZ   R[   Ra   Rb   Rc   Rh   Rp   Rq   Rt   Ru   Rw   Rz   R|   R~   R€   R�   R…   R†   R‡   R‰   RŠ   R�   RŽ   R�   R�   R‘   R’   R•   R™   Rž   R£   Rª   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyR   %   sX   																																		
				
							 	c         C   s   t  j t ƒ d  S(   N(   R    t   run_unittestR   (   t   verbose(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt	   test_mainÄ  s    t   __main__R¬   (   t   unittestt   testR    t   weakrefR   R   R   t   operatorRx   R#   t   ost   randomR   R   t   syst   warningst   collectionsRI   Rœ   R   t   objectR	   R   t   TestCaseR   Rƒ   R­   R   t   True(    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_weakset.pyt   <module>   s(   ÿ  