+
    5mj8  c                  v   ^ RI Ht ^ RIt^ RIHu Ht ^ RIt^ RI	t	^ RI
Ht ]	P                  P                  ^ ]! ]! ]4      P!                  4       P"                  ^,          4      4       ^ RIHtHt R R ltR R ltR	 R
 ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R lt R# )    )annotationsN)Path)SettingsSettingsStorec                    V ^8  d   QhRRRR/# )   tmp_pathr   returnr    )formats   "f/home/user/overdeck-private-tests/workstation-ai-broad/modules/systray/tests/test_ui_settings_store.py__annotate__r      s     5 5T 5m 5    c                &    \        V R ,          4      # )settings.json)r   )r   s   &r   _storer      s    O344r   c                    V ^8  d   QhRRRR/# r   r   r   r	   Noner
   )r   s   "r   r   r      s     1 1 1$ 1r   c                   \        V 4      qP                  q"! 4       p\        4       qCV8H  qU'       Eg   \        P                  ! RV3RW434      RR\
        P                  ! 4       9   g!   \        P                  ! \         4      '       d   \        P                  ! \         4      MRRR\
        P                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      RR	\
        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MR	R
\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;p;rTR# )==py0r   py1r   py3py5py7py9r   py11zassert %(py13)spy13Nr   )zz%(py7)s
{%(py7)s = %(py5)s
{%(py5)s = %(py3)s
{%(py3)s = %(py0)s(%(py1)s)
}.read
}()
} == %(py11)s
{%(py11)s = %(py9)s()
})r   readr   
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanation)r   @py_assert2@py_assert4@py_assert6@py_assert10@py_assert8@py_format12@py_format14s   &       r   "test_missing_file_returns_defaultsr0      s    (0  0 "0hj0j00000"0000006000060000000(0000(000000 000"000000h0000h000j000000000r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r      s     	$ 	$d 	$t 	$r   c                   \        V 4      p\        R ^x^RR7      pVP                  V4       VP                  q3! 4       qDV8H  qU'       Eg   \        P
                  ! RV3RWB34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pR	R
V/,          p\        \        P                  ! V4      4      hR;p;rER# )Tclaude)
auto_closerefresh_interval_secondswarning_threshold_pctlast_tabr   storepy2py4py6settingszassert %(py8)spy8Nr   )zC%(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.read
}()
} == %(py6)s)r   r   writer    r!   r"   r#   r$   r%   r&   r'   r(   )r   r8   r<   @py_assert1@py_assert3@py_assert5@py_format7@py_format9s   &       r   test_round_triprD      s    8E!$ 	H 
KK::#:<#8#####<######5####5###:###<######8####8########r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r       s     + +$ +4 +r   c                   \        V R ,          R,          R,          4      pVP                  \        RR7      4       VP                  q"! 4       q3P                  pRqTV8H  qf'       g   \
        P                  ! RV3RWE34      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      R	\
        P                  ! V4      R
\
        P                  ! V4      /,          pRRV/,          p\        \
        P                  ! V4      4      hR;p;p;p;reR# )nesteddirr   grok)r7   r   r8   r9   r:   r;   r   assert %(py11)sr   Nr   )za%(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.read
}()
}.last_tab
} == %(py9)s)r   r>   r   r    r7   r!   r"   r#   r$   r%   r&   r'   r(   	r   r8   r?   r@   rA   r-   @py_assert7@py_format10r.   s	   &        r   #test_write_creates_parent_directoryrN       s    (X-5GHE	KK&)*::*:<*  *F*F***** ******5****5***:***<*** ***F*********r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   &   s     & & &$ &r   c                   \        V 4      pVP                  P                  R RR7       VP                  q"! 4       p\	        4       qCV8H  qU'       Eg3   \
        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      RR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRR	\
        P                  ! V4      /,          pR
RV/,          p\        \
        P                  ! V4      4      hR;p;p;rTR# )z	{not jsonutf-8encodingr   r8   r9   r:   r;   r   r=   assert %(py10)spy10Nr   zZ%(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.read
}()
} == %(py8)s
{%(py8)s = %(py6)s()
}r   path
write_textr    r   r!   r"   r#   r$   r%   r&   r'   r(   r   r8   r?   r@   rL   rA   rC   @py_format11s   &       r   "test_corrupt_json_returns_defaultsr\   &   s    8E	JJ+8::%:<%8:%:%%%%%<%%%%%%5%%%%5%%%:%%%<%%%%%%8%%%%8%%%:%%%%%%%%r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   ,   s     & &D &T &r   c                   \        V 4      pVP                  P                  R RR7       VP                  q"! 4       p\	        4       qCV8H  qU'       Eg3   \
        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      RR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRR	\
        P                  ! V4      /,          pR
RV/,          p\        \
        P                  ! V4      4      hR;p;p;rTR# )z[1, 2]rQ   rR   r   r8   r9   r:   r;   r   r=   rT   rU   Nr   rV   rW   rZ   s   &       r   %test_non_object_json_returns_defaultsr_   ,   s    8E	JJ(W5::%:<%8:%:%%%%%<%%%%%%5%%%%5%%%:%%%<%%%%%%8%%%%8%%%:%%%%%%%%r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   2   s     & &t & &r   c           	     	   \        V 4      pVP                  P                  \        P                  ! R ^/4      RR7       VP                  4       pVP                  p^qCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP                  pRqCVJ qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP                   p^<qCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP"                  pRqCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP$                  pRqCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTR
# )r6   rQ   rR   r   r<   r9   r    assert %(py7)sr   NFsystemr   z=%(py2)s
{%(py2)s = %(py0)s.warning_threshold_pct
} == %(py5)s)is)z2%(py2)s
{%(py2)s = %(py0)s.auto_close
} is %(py5)sz@%(py2)s
{%(py2)s = %(py0)s.refresh_interval_seconds
} == %(py5)s)z0%(py2)s
{%(py2)s = %(py0)s.last_tab
} == %(py5)s)z-%(py2)s
{%(py2)s = %(py0)s.theme
} == %(py5)s)r   rX   rY   jsondumpsr    r6   r!   r"   r#   r$   r%   r&   r'   r(   r4   r5   r7   themer   r8   r<   r?   r*   r@   @py_format6@py_format8s   &       r    test_partial_file_fills_defaultsrn   2   s   8E	JJ$**&=r%BCgVzz|H))/R/R/////)//////8////8///)///R////////'%'%'''''''''''8''''8''''''%'''''''',,2222222,222222822228222,22222222222"""""""""""""8""""8"""""""""""""">>%X%X%%%%%>%%%%%%8%%%%8%%%>%%%X%%%%%%%%r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   =   s     5 5 5 5r   c                   \        V 4      pVP                  P                  \        P                  ! R RR^RR/4      RR7       VP
                  q"! 4       pRp\        VR7      qSV8H  qf'       EgI   \        P                  ! RV3RW534      RR	\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR	R
\        P                  ! V4      R\        P                  ! V4      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;p;rER# )r4   Tbogus
future_keyxrQ   rR   )r4   r   r8   r9   r:   r;   r   r=   rU   zassert %(py12)spy12Nr   )zn%(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.read
}()
} == %(py10)s
{%(py10)s = %(py6)s(auto_close=%(py8)s)
}r   rX   rY   rh   ri   r    r   r!   r"   r#   r$   r%   r&   r'   r(   )	r   r8   r?   r@   rL   @py_assert9rA   r[   @py_format13s	   &        r   test_unknown_keys_ignoredrx   =   s   8E	JJ

L$L#FG   ::4:<4t48t44444444<444444544445444:444<444444844448444t4444444444444r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   F   s     * *4 *D *r   c                   \        V 4      pVP                  \        R R7      4       VP                  q"! 4       q3P                  pR qTV8H  qf'       g   \
        P                  ! RV3RWE34      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      /,          pRR	V/,          p\        \
        P                  ! V4      4      hR
;p;p;p;reVP                  P                  \        P                   ! RR/4      RR7       VP                  q"! 4       q3P                  pRqTV8H  qf'       g   \
        P                  ! RV3RWE34      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      /,          pRR	V/,          p\        \
        P                  ! V4      4      hR
;p;p;p;reVP                  P                  \        P                   ! R^/4      RR7       VP                  q"! 4       q3P                  pRqTV8H  qf'       g   \
        P                  ! RV3RWE34      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      /,          pRR	V/,          p\        \
        P                  ! V4      4      hR
;p;p;p;reR
# )dark)rj   r   r8   r9   r:   r;   r   rJ   r   Nrj   neonrQ   rR   rd   r   )z^%(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.read
}()
}.theme
} == %(py9)s)r   r>   r   r    rj   r!   r"   r#   r$   r%   r&   r'   r(   rX   rY   rh   ri   rK   s	   &        r   ,test_theme_round_trip_and_invalid_falls_backr}   F   s7   8E	KKv&'::':<''''''''''''''5''''5''':'''<''''''''''''''	JJ$**gv%67'J::):<))))))))))))))5))))5))):)))<))))))))))))))	JJ$**gq\2WE::):<))))))))))))))5))))5))):)))<)))))))))))))))r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   P   s     / / / /r   c           	     P   \        V 4      pVP                  P                  \        P                  ! R ^R^c/4      RR7       VP                  4       pVP                  p^qCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP                  p^2qCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP                  P                  \        P                  ! R RR^ /4      RR7       VP                  4       pVP                  pRqCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTVP                  p^qCV8H  qU'       g   \        P                  ! RV3RW434      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;rTR
# )r5   r6   rQ   rR   r   r<   r9   r   rc   r   Ni?B i  r   rg   re   )r   rX   rY   rh   ri   r    r5   r!   r"   r#   r$   r%   r&   r'   r(   r6   rk   s   &       r   !test_out_of_range_numbers_clampedr   P   sl   8E	JJ

*A'	
    zz|H,,2222222,222222822228222,22222222222))/R/R/////)//////8////8///)///R////////	JJ

*G'	
    zz|H,,4444444,444444844448444,44444444444)).Q.Q.....)......8....8...)...Q........r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   m   s     & &T &d &r   c                P   \        V 4      pVP                  P                  \        P                  ! R RRRRRR^/4      RR7       VP
                  q"! 4       p\        4       qCV8H  qU'       Eg3   \        P                  ! RV3RW434      R	R
\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR
R\        P                  ! V4      R\        P                  ! V4      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;rTR# )r4   yesr5   120r6   Tr7   rQ   rR   r   r8   r9   r:   r;   r   r=   rT   rU   Nr   rV   ru   rZ   s   &       r   &test_wrong_types_fall_back_to_defaultsr   m   s    8E	JJ

e*E'A		
   
 ::%:<%8:%:%%%%%<%%%%%%5%%%%5%%%:%%%<%%%%%%8%%%%8%%%:%%%%%%%%r   c                    V ^8  d   QhRRRR/# r   r
   )r   s   "r   r   r   }   s     M MD MT Mr   c           
        \        V 4      pVP                  \        4       4       VP                  \        R RR7      4       \        P                  ! VP
                  P                  RR7      4      pRR R^<R^RRR	R
/q2V8H  qD'       g   \        P                  ! RV3RW#34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;rCV P                  4        Uu. uF  qwP                   NK  	  ppR.qV	8H  q3'       gy   \        P                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;r9R# u upi )Tcodex)r4   r7   rQ   rR   r4   r5   r6   r7   rj   rd   r   payloadr   zassert %(py5)sr   Nr   r   r:   zassert %(py6)sr;   r   )z%(py0)s == %(py3)s)z%(py1)s == %(py4)s)r   r>   r   rh   loadsrX   	read_textr!   r"   r#   r$   r%   r&   r'   r(   iterdirname)r   r8   r   r)   r?   @py_format4rl   entry@py_assert0r@   @py_format5rB   s   &           r   5test_atomic_write_leaves_valid_file_and_no_temp_filesr   }   sz   8E	KK
	KKD7;<jj--w-?@Gd"BG      7     7   7            %-$4$4$67$65JJ$6L7O;LL;LLLLLL7LLL7LLL;LLLLLLLLL7s   G0)!
__future__r   builtinsr#   _pytest.assertion.rewrite	assertionrewriter!   rh   syspathlibr   rX   insertstr__file__resolveparentsui.settings_storer   r   r   r0   rD   rN   r\   r_   rn   rx   r}   r   r   r   r
   r   r   <module>r      s    "    
  3tH~--/77:; < 551	$+&&&5*/:& Mr   