ó
¼S]c           @@  s‹   d  d l  m Z d  d l m Z m Z m Z m Z m Z d  d l j	 j
 Z
 d  d l m Z d „  Z d „  Z d „  Z d „  Z d	 „  Z d S(
   i    (   t   absolute_import(   t   push_conda_manager_classt   pop_conda_manager_classt   new_conda_managert   CondaManagert   CondaLockSetN(   t   _dump_stringc          @  s¢   t  ƒ  ‰  d t f ‡  f d †  ƒ  Y}  t |  ƒ zd t ƒ  } | j d  d  ƒ | j d  d  ƒ | j d  d  ƒ t  d d d d d d ƒ ˆ  k s’ t ‚ Wd  t	 ƒ  Xd  S(	   Nt   MyCondaManagerc           @  sG   e  Z d  „  Z d „  Z ‡  f d †  Z ‡  f d †  Z ‡  f d †  Z RS(   c         S@  s   d  S(   N(    (   t   selft   frontend(    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   __init__   s    c         S@  s   t  i  d g  ƒS(   Nt	   platforms(   R   (   R   t   package_specst   channelsR   (    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   resolve_dependencies   s    c         @  s   | ˆ  d <d  S(   Nt   find_environment_deviations(    (   R   t   args(   t   called(    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyR      s    c         @  s   | ˆ  d <d  S(   Nt   fix_environment_deviations(    (   R   R   (   R   (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyR      s    c         @  s   | ˆ  d <d  S(   Nt   remove_packages(    (   R   R   (   R   (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyR       s    (   t   __name__t
   __module__R
   R   R   R   R   (    (   R   (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyR      s
   		R   R   R   (   NN(   NN(   NN(
   t   dictR   R   R   R   t   NoneR   R   t   AssertionErrorR   (   R   t   manager(    (   R   sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt"   test_use_non_default_conda_manager   s    	
	c         C@  sÁ   t  i d d g d 6d g d 6d g d 6d g d	 6d
 d g d 6d d d g ƒ} | j d ƒ d k sk t ‚ t j ƒ  d k r“ |  j d d „  ƒ n  | j d k s¨ t ‚ | j d k s½ t ‚ d  S(   Ns   something=0.5=2s   bokeh=0.12.4=1t   alls   linux-thing=1.0=0s   linux-64s   unix-thing=5=1t   unixs   windows-cross-bit-thing=3.2t   wins   windows-thing=2.0=3s   bokeh=2.3=7s   win-32R   s4   anaconda_project.internal.conda_api.current_platformc           S@  s   d S(   Ns   linux-64(    (    (    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   <lambda>A   t    (   s   something=0.5=2s   windows-cross-bit-thing=3.2s   windows-thing=2.0=3s   bokeh=2.3=7(   s   something=0.5=2s   bokeh=0.12.4=1s   unix-thing=5=1s   linux-thing=1.0=0(   s   linux-64s   win-32(   R   t   package_specs_for_platformR   t	   conda_apit   current_platformt   setattrt"   package_specs_for_current_platformR   (   t   monkeypatcht   lock_set(    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   test_lock_set_properties1   s    


c         C@  s—   t  i d d g d 6d g d 6d d g d 6d	 d d g ƒ} i t d
 6i d d g d 6d g d 6d d g d 6d 6d d g d	 6| j ƒ  k s“ t ‚ d  S(   Ns   something=0.5=2s   bokeh=0.12.4=1R   s   linux-thing=1.0=0s   linux-64s   windows-thing=2.0=3s   bokeh=2.3=7s   win-32R   t   lockedt   packages(   R   t   Truet   to_jsonR   (   R%   R&   (    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   test_lock_set_to_jsonI   s    

c         C@  s{   t  i d d g d 6d g d 6d g d 6d d	 g d
 6d g d 6d d
 d d g ƒ} | j ƒ  } t | ƒ d k sw t ‚ d  S(   Nt   at   bR   t   xt   linuxt   yR   t   zt   qs   linux-64t   ss   osx-64R   s   win-64s–   locked: true
platforms:
- linux-64
- osx-64
- win-64
packages:
  all:
  - a
  - b
  linux:
  - x
  win:
  - y
  linux-64:
  - z
  - q
  osx-64:
  - s
(   R   R+   R   R   (   R%   R&   t   j(    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   test_lock_set_to_yaml[   s    

	c          C@  s‘  t  i d d g d 6d g d 6d g d 6d d	 g d
 6d g d 6d d
 d g ƒ}  t  i d d d g d 6d d g d 6d g d 6d	 d g d
 6d g d 6d g d 6d d
 d g ƒ} d | j |  ƒ k sË t ‚ d |  j | ƒ k sæ t ‚ d | j | ƒ k st ‚ d |  j |  ƒ k st ‚ |  j |  ƒ s1t ‚ | j | ƒ sFt ‚ |  j | ƒ s\t ‚ | j |  ƒ srt ‚ d | j d  ƒ k st ‚ d  S(   NR-   R.   R   R/   R0   R1   R   R2   R3   s   linux-64R4   s   osx-64R   t   ct   ht   wR5   s   win-64s„     platforms:
-   osx-64
+   win-64
  packages:
    all:
+     c
    linux:
+     h
    linux-64:
-     z
+     w
+   win-64:
+     js„     platforms:
-   win-64
+   osx-64
  packages:
    all:
-     c
    linux:
-     h
    linux-64:
+     z
-     w
-   win-64:
-     jR   sÃ     platforms:
+   linux-64
+   win-64
  packages:
+   all:
+     a
+     b
+     c
+   linux:
+     x
+     h
+   win:
+     y
+   linux-64:
+     q
+     w
+   osx-64:
+     s
+   win-64:
+     j(   R   t	   diff_fromR   t   equivalent_toR   (   t   old_lock_sett   new_lock_set(    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt!   test_lock_set_diff_and_equivalent}   s0    



(   t
   __future__R    t   anaconda_project.conda_managerR   R   R   R   R   t#   anaconda_project.internal.conda_apit   internalR!   t   anaconda_project.yaml_fileR   R   R'   R,   R6   R>   (    (    (    sG   lib/python2.7/site-packages/anaconda_project/test/test_conda_manager.pyt   <module>   s   (	!			"