+
    ôÉÍjÌ9  ã                   ó¦  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RIH
t
 ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RIH!t! ^ RIH"t" ^ RIH#t# ^ RIH$t$ ^ RIH%t% ]PL                  PN                  t']PP                  ! 4       t)^t*R  t+ ! R! R"]$4      t, ! R# R$],4      t-]%P\                  ! ]'       * R%4       ! R& R']$4      4       t/ ! R( R)]$4      t0]1R*8X  d   ^ R+I2H3t3 ]3! ]44       R# R# ),aª  
Tests for detecting function memory leaks (typically the ones
implemented in C). It does so by calling a function many times and
checking whether process memory usage keeps increasing between
calls or over time.
Note that this may produce false positives (especially on Windows
for some reason).
PyPy appears to be completely unstable for this framework, probably
because of how its JIT handles memory, so tests are skipped.
)Úprint_functionN)ÚLINUX)ÚMACOS)ÚOPENBSD)ÚPOSIX)ÚSUNOS)ÚWINDOWS)ÚProcessLookupError)Úsuper)Úcreate_sockets)Ú
get_testfn)ÚHAS_CPU_AFFINITY)ÚHAS_CPU_FREQ)ÚHAS_ENVIRON)Ú
HAS_IONICE)ÚHAS_MEMORY_MAPS)ÚHAS_NET_IO_COUNTERS)ÚHAS_PROC_CPU_NUM)ÚHAS_PROC_IO_COUNTERS)Ú
HAS_RLIMIT)ÚHAS_SENSORS_BATTERY)ÚHAS_SENSORS_FANS)ÚHAS_SENSORS_TEMPERATURES)Úprocess_namespace)Úskip_on_access_denied)Úspawn_testproc)Úsystem_namespace)Ú	terminate)ÚTestMemoryLeak)Úunittestc                 ó   € R p V # )zkDecorator for those Linux functions which are implemented in pure
Python, and which we want to run faster.
c                 óF   a € \         P                  ! S 4      V 3R  l4       pV# )c                 óî   <€ \         '       dI   V P                  P                  p \        V P                  n        S! V .VO5/ VB W0P                  n        # S! V .VO5/ VB #   Y0P                  n        i ; i©N)r   Ú	__class__ÚtimesÚ	FEW_TIMES)ÚselfÚargsÚkwargsÚbeforeÚfuns   &*, €ÚP/opt/data/home/.local/lib/python3.14/site-packages/psutil/tests/test_memleaks.pyÚwrapperÚ5fewtimes_if_linux.<locals>.decorator.<locals>.wrapperA   sg   ø€ ç‹uØŸ™×-Ñ-�ð2Ü+4�D—N‘NÔ(Ù˜tÐ5 dÒ5¨fÑ5à+1—N‘NÕ(á˜4Ð1 $Ò1¨&Ñ1Ð1øð ,2—N‘NÕ(ús   ¥ A" Á"A4)Ú	functoolsÚwraps)r+   r-   s   f r,   Ú	decoratorÚ$fewtimes_if_linux.<locals>.decorator@   s%   ø€ Ü	�Š˜Ó	ô		2ó 
ð		2ð ˆó    © )r1   s    r,   Úfewtimes_if_linuxr5   <   s   € òð Ðr3   c                   ó  a € ] tR t^Ut o Rt]tR t]! 4       R 4       t	]! 4       R 4       t
]! 4       R 4       t]! 4       R 4       t]P                  ! ]'       * R4      ]! 4       R 4       4       t]P                  ! ]'       * R4      ]! 4       R	 4       4       t]! 4       R
 4       tR tR t]P                  ! ]'       * R4      R 4       t]P                  ! ]'       * R4      R 4       t]P                  ! ]'       * R4      ]! 4       R 4       4       t]P                  ! ]R4      R 4       t]! 4       R 4       t]! 4       ]! ]R7      R 4       4       t]P                  ! ]'       * R4      R 4       t ]P                  ! ]'       * R4      ]! 4       R 4       4       t!]! 4       R 4       t"]! 4       ]! ]R7      R 4       4       t#]! 4       R 4       t$]! 4       ]P                  ! ]%'       * R4      R 4       4       t&]! 4       R 4       t']! 4       R 4       t(]P                  ! ]'       * R4      ]! 4       R 4       4       t)R  t*]! 4       R! 4       t+]P                  ! ],'       * R4      R" 4       t-]P                  ! ],'       * R4      R# 4       t.]! 4       R$ 4       t/]P                  ! ]0'       * R4      ]! 4       R% 4       4       t1]P                  ! ]2'       * R&4      ]P                  ! ]3'       * R4      R' 4       4       t4]P                  ! ]2'       * R&4      ]P                  ! ]3'       * R4      R( 4       4       t5]! 4       ]P                  ! ]R)4      R* 4       4       t6]P                  ! ]7'       * R4      R+ 4       t8]P                  ! ]'       * R4      R, 4       t9R-t:V t;R.# )/ÚTestProcessObjectLeaksz$Test leaks of Process class methods.c                ót   € \        R 4      pVP                  WP                  VP                  ,           4       R # r#   )r   Útest_class_coverageÚgettersÚsetters©r'   Únss   & r,   Útest_coverageÚ$TestProcessObjectLeaks.test_coverageZ   s'   € Ü˜tÓ$ˆØ
×Ñ˜t§Z¡Z°"·*±*Õ%<Ö=r3   c                óP   € V P                  V P                  P                  4       R # r#   )ÚexecuteÚprocÚname©r'   s   &r,   Ú	test_nameÚ TestProcessObjectLeaks.test_name^   ó   € à�‰�T—Y‘Y—^‘^Ö$r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚcmdlinerD   s   &r,   Útest_cmdlineÚ#TestProcessObjectLeaks.test_cmdlineb   ó   € à�‰�T—Y‘Y×&Ñ&Ö'r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚexerD   s   &r,   Útest_exeÚTestProcessObjectLeaks.test_exef   ó   € à�‰�T—Y‘Y—]‘]Ö#r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚppidrD   s   &r,   Ú	test_ppidÚ TestProcessObjectLeaks.test_ppidj   rG   r3   z
POSIX onlyc                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚuidsrD   s   &r,   Ú	test_uidsÚ TestProcessObjectLeaks.test_uidsn   ó   € ð 	�‰�T—Y‘Y—^‘^Ö$r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚgidsrD   s   &r,   Ú	test_gidsÚ TestProcessObjectLeaks.test_gidss   rZ   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚstatusrD   s   &r,   Útest_statusÚ"TestProcessObjectLeaks.test_statusx   ó   € à�‰�T—Y‘Y×%Ñ%Ö&r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚnicerD   s   &r,   Ú	test_niceÚ TestProcessObjectLeaks.test_nice|   s   € Ø�‰�T—Y‘Y—^‘^Ö$r3   c                ó^   a a€ \         P                  4       oS P                  VV 3R  l4       R# )c                  ó:   <€ SP                   P                  S 4      # r#   )rB   re   )Únicenessr'   s   €€r,   Ú<lambda>Ú6TestProcessObjectLeaks.test_nice_set.<locals>.<lambda>�   s   ø€ ˜TŸY™YŸ^™^¨HÔ5r3   N)Úthisprocre   rA   )r'   rj   s   f@r,   Útest_nice_setÚ$TestProcessObjectLeaks.test_nice_set   s   ù€ Ü—=‘=“?ˆØ�‰Õ5Ö6r3   únot supportedc                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚionicerD   s   &r,   Útest_ioniceÚ"TestProcessObjectLeaks.test_ioniceƒ   rc   r3   c                óD  a a€ \         '       d-   \        P                  4       oS P                  V V3R  l4       R# S P                  V 3R l4       \        P
                  ! \        P                  \        P                  ! 4       R^ 4      pS P                  \        V4       R# )c                  ó:   <€ S P                   P                  S4      # r#   )rB   rr   )r'   Úvalues   €€r,   rk   Ú8TestProcessObjectLeaks.test_ionice_set.<locals>.<lambda>‹   s   ø€  §¡×!1Ñ!1°%Ô!8r3   c                  óV   <€ S P                   P                  \        P                  4      # r#   )rB   rr   ÚpsutilÚIOPRIO_CLASS_NONErD   s   €r,   rk   rx   �   s   ø€  §¡×!1Ñ!1´&×2JÑ2JÔ!Kr3   Néÿÿÿÿ)r   rm   rr   rA   r/   ÚpartialÚcextÚproc_ioprio_setÚosÚgetpidÚexecute_w_excÚOSError)r'   r+   rw   s   f @r,   Útest_ionice_setÚ&TestProcessObjectLeaks.test_ionice_set‡   s`   ù€ ç‹7Ü—O‘OÓ%ˆEØ�L‰LÕ8Ö9à�L‰LÔKÔLÜ×#Ò#¤D×$8Ñ$8¼"¿)º)»+ÀrÈ1ÓMˆCØ×Ñœw¨Ö,r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úio_countersrD   s   &r,   Útest_io_countersÚ'TestProcessObjectLeaks.test_io_counters‘   ó   € ð 	�‰�T—Y‘Y×*Ñ*Ö+r3   zworthless on POSIXc                ó–   € \         P                  ! 4       P                  4        V P                  V P                  P                  4       R # r#   )rz   ÚProcessÚusernamerA   rB   rD   s   &r,   Útest_usernameÚ$TestProcessObjectLeaks.test_username–   s-   € ô 	�ŠÓ×!Ñ!Ô#Ø�‰�T—Y‘Y×'Ñ'Ö(r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úcreate_timerD   s   &r,   Útest_create_timeÚ'TestProcessObjectLeaks.test_create_timeœ   ó   € à�‰�T—Y‘Y×*Ñ*Ö+r3   )Úonly_ifc                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Únum_threadsrD   s   &r,   Útest_num_threadsÚ'TestProcessObjectLeaks.test_num_threads    rŠ   r3   úWINDOWS onlyc                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Únum_handlesrD   s   &r,   Útest_num_handlesÚ'TestProcessObjectLeaks.test_num_handles¥   r”   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Únum_fdsrD   s   &r,   Útest_num_fdsÚ#TestProcessObjectLeaks.test_num_fds©   ó   € ð 	�‰�T—Y‘Y×&Ñ&Ö'r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Únum_ctx_switchesrD   s   &r,   Útest_num_ctx_switchesÚ,TestProcessObjectLeaks.test_num_ctx_switches®   ó   € à�‰�T—Y‘Y×/Ñ/Ö0r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚthreadsrD   s   &r,   Útest_threadsÚ#TestProcessObjectLeaks.test_threads²   r£   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Ú	cpu_timesrD   s   &r,   Útest_cpu_timesÚ%TestProcessObjectLeaks.test_cpu_times·   s   € à�‰�T—Y‘Y×(Ñ(Ö)r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úcpu_numrD   s   &r,   Útest_cpu_numÚ#TestProcessObjectLeaks.test_cpu_num»   r£   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úmemory_inforD   s   &r,   Útest_memory_infoÚ'TestProcessObjectLeaks.test_memory_infoÀ   r”   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úmemory_full_inforD   s   &r,   Útest_memory_full_infoÚ,TestProcessObjectLeaks.test_memory_full_infoÄ   r¨   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚterminalrD   s   &r,   Útest_terminalÚ$TestProcessObjectLeaks.test_terminalÈ   s   € ð 	�‰�T—Y‘Y×'Ñ'Ö(r3   c                ó�   € \         '       d   \        MV P                  pV P                  V P                  P
                  VR 7       R# )©r%   N)r   r&   r%   rA   rB   Úresume©r'   r%   s   & r,   Útest_resumeÚ"TestProcessObjectLeaks.test_resumeÍ   s+   € ß"›U•	¨¯
©
ˆØ�‰�T—Y‘Y×%Ñ%¨UˆÖ3r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚcwdrD   s   &r,   Útest_cwdÚTestProcessObjectLeaks.test_cwdÑ   rQ   r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úcpu_affinityrD   s   &r,   Útest_cpu_affinityÚ(TestProcessObjectLeaks.test_cpu_affinityÕ   s   € à�‰�T—Y‘Y×+Ñ+Ö,r3   c                ó’   a a€ \         P                  4       oS P                  VV 3R  l4       S P                  \        V 3R l4       R# )c                  ó:   <€ SP                   P                  S 4      # r#   ©rB   rÌ   )Úaffinityr'   s   €€r,   rk   Ú>TestProcessObjectLeaks.test_cpu_affinity_set.<locals>.<lambda>Ü   s   ø€ ˜TŸY™Y×3Ñ3°HÔ=r3   c                  ó<   <€ S P                   P                  R.4      # ©é   r|   rÑ   rD   s   €r,   rk   rÓ   Þ   s   ø€  §	¡	× 6Ñ 6¸°tÔ <r3   N)rm   rÌ   rA   r‚   Ú
ValueError)r'   rÒ   s   f@r,   Útest_cpu_affinity_setÚ,TestProcessObjectLeaks.test_cpu_affinity_setÙ   s2   ù€ ä×(Ñ(Ó*ˆØ�‰Õ=Ô>Ø×ÑÜÔ<ö	>r3   c                óÂ   € \        \        4       R 4      ;_uu_ 4        V P                  V P                  P                  4       RRR4       R#   + '       g   i     R# ; i)ÚwN)Úopenr   rA   rB   Ú
open_filesrD   s   &r,   Útest_open_filesÚ&TestProcessObjectLeaks.test_open_filesà   s6   € ä”*“, ×$Õ$Ø�L‰L˜Ÿ™×-Ñ-Ô.÷ %×$×$Ò$ús   �&AÁA	c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   Úmemory_mapsrD   s   &r,   Útest_memory_mapsÚ'TestProcessObjectLeaks.test_memory_mapså   rŠ   r3   z
LINUX onlyc                ó2   a € S P                  V 3R  l4       R# )c                  óV   <€ S P                   P                  \        P                  4      # r#   ©rB   Úrlimitrz   ÚRLIMIT_NOFILErD   s   €r,   rk   Ú4TestProcessObjectLeaks.test_rlimit.<locals>.<lambda>í   s   ø€ ˜TŸY™Y×-Ñ-¬f×.BÑ.BÔCr3   N©rA   rD   s   fr,   Útest_rlimitÚ"TestProcessObjectLeaks.test_rlimitê   s   ø€ ð 	�‰ÔCÖDr3   c                ó¼   a a€ \         P                  \        P                  4      oS P	                  VV 3R  l4       S P                  \        \        3V 3R l4       R# )c                  óX   <€ SP                   P                  \        P                  S 4      # r#   ræ   )Úlimitr'   s   €€r,   rk   Ú8TestProcessObjectLeaks.test_rlimit_set.<locals>.<lambda>ó   s   ø€ ˜TŸY™Y×-Ñ-¬f×.BÑ.BÀEÔJr3   c                  ó:   <€ S P                   P                  R4      # rÕ   )rB   rç   rD   s   €r,   rk   rð   ô   s   ø€ ¸$¿)¹)×:JÑ:JÈ2Ô:Nr3   N)rm   rç   rz   rè   rA   r‚   rƒ   r×   )r'   rï   s   f@r,   Útest_rlimit_setÚ&TestProcessObjectLeaks.test_rlimit_setï   s<   ù€ ô —‘¤× 4Ñ 4Ó5ˆØ�‰ÕJÔKØ×ÑœG¤ZÐ0Ô2NÖOr3   zworthless on WINDOWSc                ó´   a a€ \        4       ;_uu_ 4        \        '       d   R MRoS P                  VV 3R l4       RRR4       R#   + '       g   i     R# ; i)ÚinetÚallc                  ó:   <€ SP                   P                  S 4      # r#   )rB   Úconnections)Úkindr'   s   €€r,   rk   Ú9TestProcessObjectLeaks.test_connections.<locals>.<lambda>   s   ø€  §¡×!6Ñ!6°tÔ!<r3   N)r   r   rA   )r'   rù   s   f@r,   Útest_connectionsÚ'TestProcessObjectLeaks.test_connectionsö   s5   ù€ ô ×Õß"›U‘6¨ˆDØ�L‰LÕ<Ô=÷ ××Òús   •'AÁA	c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚenvironrD   s   &r,   Útest_environÚ#TestProcessObjectLeaks.test_environ  rL   r3   c                ó*   € V P                  R  4       R# )c                  óR   € \         P                  \        P                  ! 4       4      # r#   )r~   Ú	proc_infor€   r�   r4   r3   r,   rk   Ú7TestProcessObjectLeaks.test_proc_info.<locals>.<lambda>  s   € œTŸ^™^¬B¯IªI«KÔ8r3   Nrê   rD   s   &r,   Útest_proc_infoÚ%TestProcessObjectLeaks.test_proc_info  s   € à�‰Ñ8Ö9r3   r4   N)<Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rm   rB   r>   r5   rE   rJ   rO   rT   r   ÚskipIfr   rX   r]   ra   rf   rn   r   rs   r„   r   rˆ   rŽ   r’   r   r   r˜   r   r�   r¡   r¦   r«   r¯   r   r³   r·   r»   r¿   rÅ   rÉ   r   rÍ   rØ   rÞ   r   râ   r   r   rë   rò   rû   r   rÿ   r  Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r,   r7   r7   U   s_  ø‡ € Ù.à€Dò>ñ Óñ%ó ð%ñ Óñ(ó ð(ñ Óñ$ó ð$ñ Óñ%ó ð%ð ‡_‚_˜”Y Ó-ÙÓñ%ó ó .ð%ð ‡_‚_˜”Y Ó-ÙÓñ%ó ó .ð%ñ Óñ'ó ð'ò%ò7ð ‡_‚_˜”^ _Ó5ñ'ó 6ð'ð ‡_‚_˜”^ _Ó5ñ-ó 6ð-ð ‡_‚_Ð-Ô-¨Ó?ÙÓñ,ó ó @ð,ð ‡_‚_�UÐ0Ó1ñ)ó 2ð)ñ
 Óñ,ó ð,ñ ÓÙ 7Ô+ñ,ó ,ó ð,ð ‡_‚_˜”[ .Ó1ñ,ó 2ð,ð ‡_‚_˜”Y Ó-ÙÓñ(ó ó .ð(ñ Óñ1ó ð1ñ ÓÙ 7Ô+ñ(ó ,ó ð(ñ Óñ*ó ð*ñ ÓØ‡_‚_Ð)Ô)¨?Ó;ñ(ó <ó ð(ñ Óñ,ó ð,ñ Óñ1ó ð1ð ‡_‚_˜”Y Ó-ÙÓñ)ó ó .ð)ò4ñ Óñ$ó ð$ð ‡_‚_Ð)Ô)¨?Ó;ñ-ó <ð-ð ‡_‚_Ð)Ô)¨?Ó;ñ>ó <ð>ñ Óñ/ó ð/ð ‡_‚_˜Ô(¨/Ó:ÙÓñ,ó ó ;ð,ð ‡_‚_˜”Y Ó-Ø‡_‚_˜”^ _Ó5ñEó 6ó .ðEð ‡_‚_˜”Y Ó-Ø‡_‚_˜”^ _Ó5ñPó 6ó .ðPñ
 Óð ‡_‚_�WÐ4Ó5ñ>ó 6ó ð>ð ‡_‚_˜”_ oÓ6ñ(ó 7ð(ð ‡_‚_˜”[ .Ó1ñ:ó 2ö:r3   r7   c                   ó    a a€ ] tR tRt oRt]V 3R l4       t]V 3R l4       tR t]	'       d   R t
R tR tR	 tR
 tR tRtVtV ;t# RtVtV ;t# )ÚTestTerminatedProcessLeaksi  záRepeat the tests above looking for leaks occurring when dealing
with terminated processes raising NoSuchProcess exception.
The C functions are still invoked but will follow different code
paths. We'll check those code paths.
c                ó  <€ \        4       P                  4        \        4       V n        \        P
                  ! V P                  P                  4      V n        V P                  P                  4        V P                  P                  4        R # r#   )
r
   Ú
setUpClassr   Úsubprz   rŒ   ÚpidrB   ÚkillÚwait©Úclsr$   s   &€r,   r  Ú%TestTerminatedProcessLeaks.setUpClass  sM   ø€ ä‹×ÑÔÜ!Ó#ˆŒÜ—>’> #§(¡(§,¡,Ó/ˆŒØ�‰�‰ŒØ�‰�‰Žr3   c                ób   <€ \        4       P                  4        \        V P                  4       R # r#   )r
   ÚtearDownClassr   r  r  s   &€r,   r  Ú(TestTerminatedProcessLeaks.tearDownClass  s   ø€ ä‹×ÑÔÜ�#—(‘(Ör3   c                óN   €  V! 4        R #   \         P                   d     R # i ; ir#   )rz   ÚNoSuchProcess)r'   r+   s   &&r,   ÚcallÚTestTerminatedProcessLeaks.call  s$   € ð	ÙŽEøÜ×#Ñ#ô 	Úð	ús   ‚ ‹$£$c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   r  rD   s   &r,   Ú	test_killÚ$TestTerminatedProcessLeaks.test_kill'  ó   € Ø�L‰L˜Ÿ™Ÿ™Ö(r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   r   rD   s   &r,   Útest_terminateÚ)TestTerminatedProcessLeaks.test_terminate*  s   € Ø�L‰L˜Ÿ™×,Ñ,Ö-r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   ÚsuspendrD   s   &r,   Útest_suspendÚ'TestTerminatedProcessLeaks.test_suspend-  s   € Ø�L‰L˜Ÿ™×*Ñ*Ö+r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   rÃ   rD   s   &r,   rÅ   Ú&TestTerminatedProcessLeaks.test_resume0  s   € Ø�L‰L˜Ÿ™×)Ñ)Ö*r3   c                óP   € V P                  V P                  P                  4       R # r#   )rA   rB   r  rD   s   &r,   Ú	test_waitÚ$TestTerminatedProcessLeaks.test_wait3  r&  r3   c                ó6   a € V 3R  lpS P                  V4       R# )c                  ó|   <€  \         P                  S P                  P                  4      #   \         d     R # i ; ir#   )r~   r  rB   r  r	   rD   s   €r,   r!  Ú7TestTerminatedProcessLeaks.test_proc_info.<locals>.call8  s1   ø€ ðÜŸ>™>¨$¯)©)¯-©-Ó8Ð8øÜ)ô Úðús   ƒ(, ¬;º;Nrê   )r'   r!  s   f r,   r  Ú)TestTerminatedProcessLeaks.test_proc_info6  s   ø€ õð �L‰L˜Ör3   r4   )r  r  r	  r
  r  Úclassmethodr  r  r!  r   r$  r(  r,  rÅ   r1  r  r  r  Ú__classcell__)r$   r  s   @@r,   r  r    sd   ù‡ € ñð ôó ðð ôó ðò÷ ò	)ò	.ò	,ò	+ò	)÷	ò 	÷# r3   r  rš   c                   ó,   a € ] tR tRt o R tR tRtV tR# )ÚTestProcessDualImplementationiA  c                ó*   € V P                  R  4       R# )c                  óV   € \         P                  \        P                  ! 4       R R7      # )T©Úuse_peb©r~   Úproc_cmdliner€   r�   r4   r3   r,   rk   ÚETestProcessDualImplementation.test_cmdline_peb_true.<locals>.<lambda>E  s   € œT×.Ñ.¬r¯yªy«{ÀDÐ.ÔIr3   Nrê   rD   s   &r,   Útest_cmdline_peb_trueÚ3TestProcessDualImplementation.test_cmdline_peb_trueD  s   € Ø�‰ÑIÖJr3   c                ó*   € V P                  R  4       R# )c                  óV   € \         P                  \        P                  ! 4       R R7      # )Fr=  r?  r4   r3   r,   rk   ÚFTestProcessDualImplementation.test_cmdline_peb_false.<locals>.<lambda>H  s   € œT×.Ñ.¬r¯yªy«{ÀEÐ.ÔJr3   Nrê   rD   s   &r,   Útest_cmdline_peb_falseÚ4TestProcessDualImplementation.test_cmdline_peb_falseG  s   € Ø�‰ÑJÖKr3   r4   N)r  r  r	  r
  rB  rG  r  r  r  s   @r,   r:  r:  A  s   ø‡ € òK÷Lð Lr3   r:  c                   óV  a € ] tR tRt o RtR t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t	]! 4       R 4       t
]! 4       R 4       t]! 4       ]P                  ! ]'       * R	4      R
 4       4       t]P                  ! ]'       * R4      R 4       tR t]P                  ! ]R4      R 4       tR tR tR t]P                  ! ];'       d!    ]P4                  P7                  R4      '       * R4      ]! 4       R 4       4       t]! 4       R 4       t]! 4       ]P                  ! ]'       * R	4      R 4       4       t]! 4       ]P                  ! ] ;'       d    ]PB                  ! 4       ^ 8g  R4      R 4       4       t"R t#R t$]! 4       ]P                  ! ]%'       * R	4      R 4       4       t&]! 4       ]P                  ! ]''       * R	4      R 4       4       t(]! 4       ]P                  ! ])'       * R	4      R 4       4       t*]! 4       R 4       t+R  t,]'       d   R! t-R" t.R# t/R$ t0R% t1R&t2V t3R'# R&t2V t3R'# )(ÚTestModuleFunctionsLeaksiP  z&Test leaks of psutil module functions.c                óP   € \        4       pVP                  WP                  4       R # r#   )r   r9   rö   r<   s   & r,   r>   Ú&TestModuleFunctionsLeaks.test_coverageS  s   € ÜÓˆØ
×Ñ˜t§V¡VÖ,r3   c                ó*   € V P                  R  4       R# )c                  ó0   € \         P                  ! R R7      # )T©Úlogical©rz   Ú	cpu_countr4   r3   r,   rk   Ú9TestModuleFunctionsLeaks.test_cpu_count.<locals>.<lambda>[  s   € œV×-Ò-°dÕ;r3   Nrê   rD   s   &r,   Útest_cpu_countÚ'TestModuleFunctionsLeaks.test_cpu_countY  s   € à�‰Ñ;Ö<r3   c                ó*   € V P                  R  4       R# )c                  ó0   € \         P                  ! R R7      # )FrO  rQ  r4   r3   r,   rk   ÚBTestModuleFunctionsLeaks.test_cpu_count_physical.<locals>.<lambda>_  s   € œV×-Ò-°eÕ<r3   Nrê   rD   s   &r,   Útest_cpu_count_physicalÚ0TestModuleFunctionsLeaks.test_cpu_count_physical]  s   € à�‰Ñ<Ö=r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   r®   rD   s   &r,   r¯   Ú'TestModuleFunctionsLeaks.test_cpu_timesa  ó   € à�‰”V×%Ñ%Ö&r3   c                ó*   € V P                  R  4       R# )c                  ó0   € \         P                  ! R R7      # )T)Úpercpu)rz   r®   r4   r3   r,   rk   Ú=TestModuleFunctionsLeaks.test_per_cpu_times.<locals>.<lambda>g  s   € œV×-Ò-°TÕ:r3   Nrê   rD   s   &r,   Útest_per_cpu_timesÚ+TestModuleFunctionsLeaks.test_per_cpu_timese  s   € à�‰Ñ:Ö;r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Ú	cpu_statsrD   s   &r,   Útest_cpu_statsÚ'TestModuleFunctionsLeaks.test_cpu_statsi  r]  r3   rp   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úcpu_freqrD   s   &r,   Útest_cpu_freqÚ&TestModuleFunctionsLeaks.test_cpu_freqm  s   € ð 	�‰”V—_‘_Ö%r3   rš   c                ón   € \         P                  ! 4        V P                  \         P                  4       R # r#   )rz   Ú
getloadavgrA   rD   s   &r,   Útest_getloadavgÚ(TestModuleFunctionsLeaks.test_getloadavgr  s    € ä×ÒÔØ�‰”V×&Ñ&Ö'r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úvirtual_memoryrD   s   &r,   Útest_virtual_memoryÚ,TestModuleFunctionsLeaks.test_virtual_memoryy  s   € Ø�‰”V×*Ñ*Ö+r3   z&worthless on SUNOS (uses a subprocess)c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úswap_memoryrD   s   &r,   Útest_swap_memoryÚ)TestModuleFunctionsLeaks.test_swap_memory}  s   € à�‰”V×'Ñ'Ö(r3   c                ój   € \         '       d   \        MV P                  pV P                  R  VR7       R# )c                  óT   € \         P                  ! \        P                  ! 4       4      # r#   )rz   Ú
pid_existsr€   r�   r4   r3   r,   rk   Ú:TestModuleFunctionsLeaks.test_pid_exists.<locals>.<lambda>ƒ  s   € œV×.Ò.¬r¯yªy«{Ô;r3   rÂ   N©r   r&   r%   rA   rÄ   s   & r,   Útest_pid_existsÚ(TestModuleFunctionsLeaks.test_pid_exists�  s"   € ß"›U•	¨¯
©
ˆØ�‰Ñ;À5ˆÖIr3   c                ój   € \         '       d   \        MV P                  pV P                  R  VR7       R# )c                  ó.   € \         P                  ! R 4      # )Ú.)rz   Ú
disk_usager4   r3   r,   rk   Ú:TestModuleFunctionsLeaks.test_disk_usage.<locals>.<lambda>‰  s   € œV×.Ò.¨sÔ3r3   rÂ   Nr|  rÄ   s   & r,   Útest_disk_usageÚ(TestModuleFunctionsLeaks.test_disk_usage‡  s"   € ß"›U•	¨¯
©
ˆØ�‰Ñ3¸5ˆÖAr3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Údisk_partitionsrD   s   &r,   Útest_disk_partitionsÚ-TestModuleFunctionsLeaks.test_disk_partitions‹  s   € Ø�‰”V×+Ñ+Ö,r3   z/proc/diskstatsz3/proc/diskstats not available on this Linux versionc                ó*   € V P                  R  4       R# )c                  ó0   € \         P                  ! R R7      # ©F)Únowrap)rz   Údisk_io_countersr4   r3   r,   rk   Ú@TestModuleFunctionsLeaks.test_disk_io_counters.<locals>.<lambda>’  s   € œV×4Ò4¸EÕBr3   Nrê   rD   s   &r,   Útest_disk_io_countersÚ.TestModuleFunctionsLeaks.test_disk_io_countersŽ  s   € ð 	�‰ÑBÖCr3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   ÚpidsrD   s   &r,   Ú	test_pidsÚ"TestModuleFunctionsLeaks.test_pids–  s   € à�‰”V—[‘[Ö!r3   c                ó*   € V P                  R  4       R# )c                  ó0   € \         P                  ! R R7      # rŒ  )rz   Únet_io_countersr4   r3   r,   rk   Ú?TestModuleFunctionsLeaks.test_net_io_counters.<locals>.<lambda>Ÿ  s   € œV×3Ò3¸5ÕAr3   Nrê   rD   s   &r,   Útest_net_io_countersÚ-TestModuleFunctionsLeaks.test_net_io_countersœ  s   € ð 	�‰ÑAÖBr3   zneed root accessc                ó¶   € \         P                  ! R R7       \        4       ;_uu_ 4        V P                  R 4       RRR4       R#   + '       g   i     R# ; i)rö   ©rù   c                  ó0   € \         P                  ! R R7      # )rö   r�  )rz   Únet_connectionsr4   r3   r,   rk   Ú?TestModuleFunctionsLeaks.test_net_connections.<locals>.<lambda>§  s   € ¤×!7Ò!7¸UÕ!Cr3   N)rz   rŸ  r   rA   rD   s   &r,   Útest_net_connectionsÚ-TestModuleFunctionsLeaks.test_net_connections¡  s7   € ô 	×Ò EÕ*Ü×ÕØ�L‰LÑCÔD÷ ××Òús   ªAÁA	c                ó|   € \         '       d   RMV P                  pV P                  \        P                  VR7       R# )éP   )Ú	toleranceNi @ )r   r¥  rA   rz   Únet_if_addrs)r'   r¥  s   & r,   Útest_net_if_addrsÚ*TestModuleFunctionsLeaks.test_net_if_addrs©  s'   € ç!(£‘I¨d¯n©nˆ	Ø�‰”V×(Ñ(°IˆÖ>r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Únet_if_statsrD   s   &r,   Útest_net_if_statsÚ*TestModuleFunctionsLeaks.test_net_if_stats®  s   € Ø�‰”V×(Ñ(Ö)r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úsensors_batteryrD   s   &r,   Útest_sensors_batteryÚ-TestModuleFunctionsLeaks.test_sensors_battery³  s   € ð 	�‰”V×+Ñ+Ö,r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úsensors_temperaturesrD   s   &r,   Útest_sensors_temperaturesÚ2TestModuleFunctionsLeaks.test_sensors_temperatures¸  s   € ð 	�‰”V×0Ñ0Ö1r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Úsensors_fansrD   s   &r,   Útest_sensors_fansÚ*TestModuleFunctionsLeaks.test_sensors_fans½  s   € ð 	�‰”V×(Ñ(Ö)r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   Ú	boot_timerD   s   &r,   Útest_boot_timeÚ'TestModuleFunctionsLeaks.test_boot_timeÄ  r]  r3   c                óD   € V P                  \        P                  4       R # r#   )rA   rz   ÚusersrD   s   &r,   Ú
test_usersÚ#TestModuleFunctionsLeaks.test_usersÈ  s   € Ø�‰”V—\‘\Ö"r3   c                óD   € V P                  \        P                  4       R # r#   )rA   r~   Úwinservice_enumeraterD   s   &r,   Útest_win_service_iterÚ.TestModuleFunctionsLeaks.test_win_service_iterÏ  s   € Ø�L‰Lœ×2Ñ2Ö3r3   c                ó   € R # r#   r4   rD   s   &r,   Útest_win_service_getÚ-TestModuleFunctionsLeaks.test_win_service_getÒ  s   € Ùr3   c                óŠ   a€ \        \        P                  ! 4       4      P                  4       oV P	                  V3R  l4       R# )c                  ó.   <€ \         P                  S 4      # r#   )r~   Úwinservice_query_config©rC   s   €r,   rk   ÚFTestModuleFunctionsLeaks.test_win_service_get_config.<locals>.<lambda>×  ó   ø€ ¤×!=Ñ!=¸dÔ!Cr3   N©Únextrz   Úwin_service_iterrC   rA   ©r'   rC   s   &@r,   Útest_win_service_get_configÚ4TestModuleFunctionsLeaks.test_win_service_get_configÕ  ó,   ø€ Üœ×/Ò/Ó1Ó2×7Ñ7Ó9ˆDØ�L‰LÔCÖDr3   c                óŠ   a€ \        \        P                  ! 4       4      P                  4       oV P	                  V3R  l4       R# )c                  ó.   <€ \         P                  S 4      # r#   )r~   Úwinservice_query_statusrË  s   €r,   rk   ÚFTestModuleFunctionsLeaks.test_win_service_get_status.<locals>.<lambda>Û  rÍ  r3   NrÎ  rÑ  s   &@r,   Útest_win_service_get_statusÚ4TestModuleFunctionsLeaks.test_win_service_get_statusÙ  rÔ  r3   c                óŠ   a€ \        \        P                  ! 4       4      P                  4       oV P	                  V3R  l4       R# )c                  ó.   <€ \         P                  S 4      # r#   )r~   Úwinservice_query_descrrË  s   €r,   rk   ÚKTestModuleFunctionsLeaks.test_win_service_get_description.<locals>.<lambda>ß  s   ø€ ¤×!<Ñ!<¸TÔ!Br3   NrÎ  rÑ  s   &@r,   Ú test_win_service_get_descriptionÚ9TestModuleFunctionsLeaks.test_win_service_get_descriptionÝ  s,   ø€ Üœ×/Ò/Ó1Ó2×7Ñ7Ó9ˆDØ�L‰LÔBÖCr3   r4   N)4r  r  r	  r
  r  r>   r5   rT  rY  r¯   rb  rf  r   r  r   rj  r   rn  rr  r   rv  r}  r„  rˆ  r   r€   ÚpathÚexistsr�  r”  r   rš  r   Úgetuidr¡  r§  r«  r   r¯  r   r³  r   r·  r»  r¿  rÃ  rÆ  rÒ  rÙ  rß  r  r  r  s   @r,   rJ  rJ  P  s´  ø‡ € Ù0ò-ñ Óñ=ó ð=ñ Óñ>ó ð>ñ Óñ'ó ð'ñ Óñ<ó ð<ñ Óñ'ó ð'ñ ÓØ‡_‚_˜Ô% Ó7ñ&ó 8ó ð&ð ‡_‚_˜”[ .Ó1ñ(ó 2ð(ò,ð ‡_‚_�UÐDÓEñ)ó Fð)òJòBò-ð ‡_‚_�U×DÐD 2§7¡7§>¡>Ð2CÓ#DÔDØJóLáÓñDó óLðDñ
 Óñ"ó ð"ñ
 ÓØ‡_‚_Ð,Ô,¨oÓ>ñCó ?ó ðCñ ÓØ‡_‚_�U×/Ð/˜rŸyšy›{¨aÑ/Ð1CÓDñEó Eó ðEò?ò
*ñ
 ÓØ‡_‚_Ð,Ô,¨oÓ>ñ-ó ?ó ð-ñ ÓØ‡_‚_Ð1Ô1°?ÓCñ2ó Dó ð2ñ ÓØ‡_‚_Ð)Ô)¨?Ó;ñ*ó <ó ð*ñ
 Óñ'ó ð'ò#÷ ò	4ò	ò	Eò	E÷	Dð 	Dõ% r3   rJ  Ú__main__)Úrun_from_name)5r  Ú
__future__r   r/   r€   rz   Úpsutil._commonr   r   r   r   r   r   Úpsutil._compatr	   r
   Úpsutil.testsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Ú_psplatformr~   rŒ   rm   r&   r5   r7   r  r  r:  rJ  r  Úpsutil.tests.runnerrå  Ú__file__r4   r3   r,   Ú<module>rí     s  ðñ	õ &Û Û 	ã Û Ý Ý Ý Ý Ý Ý Ý -Ý  Ý 'Ý #Ý )Ý %Ý $Ý #Ý (Ý ,Ý )Ý -Ý #Ý ,Ý )Ý 1Ý *Ý .Ý 'Ý )Ý "Ý 'Ý !ð ×Ñ×Ñ€Ø�>Š>Ó€Ø€	òô2s:˜^ô s:ôl3Ð!7ô 3ðl 
‡‚�W”˜nÓ-ôL Nó Ló .ðLôOD˜~ô ODðd ˆzÔÝ1Ù�(Öñ r3   