U 1g@sfdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddl m Z ddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddl mZddl mZddl mZddl mZddl m Z ddl m!Z!ddl m"Z"ddl m#Z#ddl m$Z$ddl m%Z%ddl m&Z&ddl m'Z'ddl m(Z(ddl m)Z)ddl m*Z*dd l m+Z+dd!l m,Z,dd"l m-Z-Gd#d$d$e'Z.Gd%d&d&e'Z/Gd'd(d(e'Z0Gd)d*d*e'Z1e2d+d,Z3Gd-d.d.e'Z4e*j5j6ej78e& d/d0Gd1d2d2e'Z9dS)3zMiscellaneous tests.N)POSIX)WINDOWS)bcat)cat)debug) isfile_strict)memoize)memoize_when_activated)parse_environ_block) supports_ipv6) wrap_numbers)PY3)FileNotFoundError)redirect_stderr) CI_TESTING) HAS_BATTERY)HAS_MEMORY_MAPS)HAS_NET_IO_COUNTERS)HAS_SENSORS_BATTERY)HAS_SENSORS_FANS)HAS_SENSORS_TEMPERATURES) PYTHON_EXE)PYTHON_EXE_ENV) QEMU_USER) SCRIPTS_DIR)PsutilTestCase)mock)process_namespace)pytest) reload_module)sh)system_namespacec@seZdZddZefddZddZddZd d Zd d Z d dZ ddZ ddZ ddZ ddZddZddZddZddZdS) TestSpecialMethodsc CsRtttjjddW5QRXttjtddW5QRXdS)N) rraises OverflowErrorpsutilZ _psplatformZcextZcheck_pid_range NoSuchProcessProcessselfr,F/opt/hc_python/lib64/python3.8/site-packages/psutil/tests/test_misc.pytest_check_pid_range>s z'TestSpecialMethods.test_check_pid_rangec Cst|j}||}d|ks$td|j|ks6tdt||ddksVtd|ksbtd|ksnt|| ||}d|kstd|kstt j j tjd t td @t}||}d|j|kstd |kstd |kstW5QRXt j j tjd ttd Ft}||}d|j|ksFtd |ksTtd |ksbtW5QRXt j j tjd ttd 8t}||}d|j|kstd |kstW5QRXdS)Nzpsutil.Processzpid=%sz name='%s'zname=u'zname='zstatus=z exitcode=zstatus='terminated'nameZ side_effectzstatus='zombie'zname=Z terminated)r'r)Zspawn_testprocpidAssertionErrorstrr/replace terminatewaitrpatchobject ZombieProcessosgetpidr( AccessDenied)r+funcprr,r,r-test_process__repr__DsR          z'TestSpecialMethods.test_process__repr__cCs|jtddS)N)r=)r@r3r*r,r,r-test_process__str__psz&TestSpecialMethods.test_process__str__cCsttdkstdS)Nzpsutil.Error())reprr'Errorr2r*r,r,r-test_error__repr__ssz%TestSpecialMethods.test_error__repr__cCsttdkstdS)N)r3r'rCr2r*r,r,r-test_error__str__vsz$TestSpecialMethods.test_error__str__cCs6ttddkstttjdddddks2tdS)NAz=psutil.NoSuchProcess(pid=321, msg='process no longer exists')r/msgr/rHz5psutil.NoSuchProcess(pid=321, name='name', msg='msg'))rBr'r(r2r*r,r,r-test_no_such_process__repr__ys z/TestSpecialMethods.test_no_such_process__repr__cCs6ttddkstttjdddddks2tdS)NrGz"process no longer exists (pid=321)r/rHrImsg (pid=321, name='name'))r3r'r(r2r*r,r,r-test_no_such_process__str__s z.TestSpecialMethods.test_no_such_process__str__cCs8ttddkstttjddddddks4tdS)NrGzGpsutil.ZombieProcess(pid=321, msg="PID still exists but it's a zombie")r/@foor/ppidrHz?psutil.ZombieProcess(pid=321, ppid=320, name='name', msg='foo'))rBr'r9r2r*r,r,r-test_zombie_process__repr__s z.TestSpecialMethods.test_zombie_process__repr__cCs8ttddkstttjddddddks4tdS)NrGz,PID still exists but it's a zombie (pid=321)r/rMrNrOz$foo (pid=321, ppid=320, name='name'))r3r'r9r2r*r,r,r-test_zombie_process__str__s z-TestSpecialMethods.test_zombie_process__str__cCs6ttddkstttjdddddks2tdS)NrGzpsutil.AccessDenied(pid=321)r/rHrIz4psutil.AccessDenied(pid=321, name='name', msg='msg'))rBr'r<r2r*r,r,r-test_access_denied__repr__s z-TestSpecialMethods.test_access_denied__repr__cCs6ttddkstttjdddddks2tdS)NrGz (pid=321)r/rHrIrK)r3r'r<r2r*r,r,r-test_access_denied__str__s z,TestSpecialMethods.test_access_denied__str__cCs6ttddkstttjdddddks2tdS)Nz?psutil.TimeoutExpired(seconds=5, msg='timeout after 5 seconds')rGr/r1r/zUpsutil.TimeoutExpired(pid=321, name='name', seconds=5, msg='timeout after 5 seconds'))rBr'TimeoutExpiredr2r*r,r,r-test_timeout_expired__repr__s z/TestSpecialMethods.test_timeout_expired__repr__cCs6ttddkstttjdddddks2tdS)NrUztimeout after 5 secondsrGr/rVz.timeout after 5 seconds (pid=321, name='name'))r3r'rWr2r*r,r,r-test_timeout_expired__str__s z.TestSpecialMethods.test_timeout_expired__str__cCs>t}t}||kstd|_||ks.t|dks:tdS)N)rrrN)r'r)r2_ident)r+p1Zp2r,r,r-test_process__eq__s   z%TestSpecialMethods.test_process__eq__cCs(tttg}t|dks$tdS)N)setr'r)lenr2)r+sr,r,r-test_process__hash__sz'TestSpecialMethods.test_process__hash__N)__name__ __module__ __qualname__r.rBr@rArDrFrJrLrQrRrSrTrXrYr\rar,r,r,r-r"=s ,     r"c@s<eZdZddZddZddZddZd d Zd d Zd S)TestMiscc Cstt}|D]}|dkrq |ds z t|Wq tk r|tjkrtt|}|dkr`Yq |jdk rd|jkr| d|Yq Xq tjD]}||kst qdS)N)rlongZteststestPermissionErrorProcessLookupError_ deprecatedz%r not in psutil.__all__) dirr' startswith __import__ ImportError__all__getattr__doc__lowerfailr2)r+Z dir_psutilr/funr,r,r- test__all__s&      zTestMisc.test__all__cCs$dddtjDtjks tdS)N.cSsg|] }t|qSr,)r3).0xr,r,r- sz)TestMisc.test_version..)joinr' version_info __version__r2r*r,r,r- test_versionszTestMisc.test_versioncCs"t}d|_d|kstdS)N1rN)r'r)rNas_dictr2)r+r>r,r,r-!test_process_as_dict_no_new_namessz*TestMisc.test_process_as_dict_no_new_namesc Csdd}t}|tt|}|j|jddD]L\}}|j||d0z |}Wntjk rpYn X||W5QRXq8t}||jD]b\}}|dkrqt r|dkrq|j|d0z |}Wntj k rYn X||W5QRXqt t tjd d d d }t|tjs*t|jd ks:t|jd ksJt|jd ksZtt t tjd d d d d}t|tjst|jd kst|jd kst|jd kst|jd kstt t tj dd d d }t|tj st|jdkst|jd kst|jd ks(tt t tjdd d d}t|tjsVt|jdksft|jd ksvt|jd kstdS)NcSs4tt|t|}t|}||ks0tdSN)jsonloadsdumpspickler2)retabr,r,r-checks  z*TestMisc.test_serialization..checkT) clear_cache)procr/>win_service_iterwin_service_getZ net_if_stats)r/ir/rH)r1r/rH*)r1r/rPrH{!)secondsr1r/)r'r)rritergettersZsubTestrCr!rr<rrrr( isinstancer2r1r/rHr9rPrWr)r+rrnsrur/rrr,r,r-test_serializationst    zTestMisc.test_serializationc Cstjjtjdtjd}t|js*tW5QRXtjjtjdtdd}t|jsbtW5QRXtjjtjdt d.}t t tW5QRX|jstW5QRXtjjtjdt dd0}| tj tW5QRX|jstW5QRXdS)NZ _get_identr0r])rr7r8r'r)r<calledr2r9 ValueErrorrr%r(Z assertRaises)r+methr,r,r-test_ad_on_process_creationasD z$TestMisc.test_ad_on_process_creationc CsRtjddd:tt}ttW5QRXdt|j ksDt W5QRXdS)Nzpsutil._psplatform.cext.versionz0.0.0Z return_valuezversion conflict) rr7rr%rorr'r3valuersr2)r+cmr,r,r-test_sanity_version_check~s z"TestMisc.test_sanity_version_checkN) rbrcrdrvr~rrrrr,r,r,r-res !]rec@sReZdZddZeZdddZddZdd Zd d Zd d Z ddZ ddZ dS)TestMemoizeDecoratorcCs g|_dSrcallsr*r,r,r-setUpszTestMemoizeDecorator.setUpNcCs2tdD]2}|}|jdifgks&t|dk r||kstqtdD]:}|d}|jdifdifgksjt|dk rD||ksDtqDtdD]H}|ddd}|jdifdifdddifgkst|dk r||kstqt|jdkst||}|dk r ||ks tt|jdkst|jd ks.tdS) Nr#r,r]r]barr My docstring.)rangerr2r_ cache_clearrr)r+objexpected_retvalrjrr,r,r- run_againsts,    $ z TestMemoizeDecorator.run_againstcs&tfdd}||j|dddS)Ncsj||fdSrrappendargskwargsZ baseclassr,r-rNsz/TestMemoizeDecorator.test_function..foorr)rr)r+rNr,rr- test_functionsz"TestMemoizeDecorator.test_functioncs>tGfddd}||j|dd|dks:tdS)Ncs$eZdZdZfddZddZdS)z,TestMemoizeDecorator.test_class..Foorcsj||fdSrrr+rrrr,r-__init__sz5TestMemoizeDecorator.test_class..Foo.__init__cSsdS)Nrr,r*r,r,r-rsz0TestMemoizeDecorator.test_class..Foo.barN)rbrcrdrrrrr,rr,r-Foos rrr)rrrr2r+rr,rr- test_classs  zTestMemoizeDecorator.test_classcCstGddd}||ks"tt|t|ks:tt|dt|dksVtt|dddt|dddksztt|dt|dkstdS)Nc@seZdZddZdS)z6TestMemoizeDecorator.test_class_singleton..Barc_sdSrr,rr,r,r-rsz?TestMemoizeDecorator.test_class_singleton..Bar.__init__N)rbrcrdrr,r,r,r-Barsrr]r)rNr#)rr2id)r+rr,r,r-test_class_singletons$z)TestMemoizeDecorator.test_class_singletoncs,Gfddd}||j|jdddS)Ncs eZdZeefddZdS)z3TestMemoizeDecorator.test_staticmethod..Foocsj||fdSrrrrr,r-rsz7TestMemoizeDecorator.test_staticmethod..Foo.barN)rbrcrd staticmethodrrr,rr,r-rsrrrrrrr,rr-test_staticmethodsz&TestMemoizeDecorator.test_staticmethodcs,Gfddd}||j|jdddS)Ncs eZdZeefddZdS)z2TestMemoizeDecorator.test_classmethod..Foocsj||fdSrr)clsrrrr,r-rsz6TestMemoizeDecorator.test_classmethod..Foo.barN)rbrcrd classmethodrrr,rr,r-rsrrrrrr,rr-test_classmethodsz%TestMemoizeDecorator.test_classmethodcstfdd}gtdD].}|}dif}||ks:ttdkstqtdD]0}|d}dif}||kstttdksTtqTtdD]8}|ddd}dddif}||ksttd kstq||}dif}||ksttd kst|jd ks tdS) Ncsd||fS)Foo docstring.Nrrrr,r-rNs z/TestMemoizeDecorator.test_original..foor#r,r]rrrrrr)rrr2r_rrr)r+rNrjrexpectedr,rr- test_originals0         z"TestMemoizeDecorator.test_original)N) rbrcrdrtearDownrrrrrrrr,r,r,r-rs     rc@s<eZdZddZddZddZddZd d Zd d Zd S)TestCommonModulecsGfddd}|}g||tdks.FoocsddSrrr*rr,r-rNsz=TestCommonModule.test_memoize_when_activated..Foo.fooN)rbrcrdr rNr,rr,r-rsrr#r])rNr_r2Zcache_activateZcache_deactivate)r+rfr,rr-test_memoize_when_activateds   z,TestCommonModule.test_memoize_when_activatedcCsdd}td|ddiks ttd|dd|ddiks@ttd |dd|dd iks`ttd |dd|ddiksttd |ddiksttd |ddiksttd|ddikstdS)NcSstr |S|Sr)rupper)r`r,r,r-k0sz4TestCommonModule.test_parse_environ_block..kza=1rrz a=1b=2r2za=1b=rEz a=1b=2c=3zxxxa=1z a=1=b=2za=1b=2)r r2)r+rr,r,r-test_parse_environ_block/s$   z)TestCommonModule.test_parse_environ_blockc Cs@|tjtrtd}d|_ttr6tW5QRXttjdtjd}trdt|j sntW5QRXttjdtj d"}trtt|j stW5QRXttjdtj d"}trtt|j stW5QRXnBt tj0ttj tj}z|dW5|XW5QRXdS)Nzpsutil._common.socketFzpsutil._common.socket.socketr0z!psutil._common.socket.socket.bind)z::1r)Z addCleanupr rrr7has_ipv6r2socketerrorrgaierrorrr%AF_INET6 SOCK_STREAMclosebind)r+r`sockr,r,r-test_supports_ipv6DsJ     z#TestCommonModule.test_supports_ipv6c Cstjt}t|stttj|r,ttjdt t j dd$t t t|W5QRXW5QRXtjdt t jdd$t t t|W5QRXW5QRXtjdt t jddt|rtW5QRXtjdddt|rtW5QRXdS)Nzpsutil._common.os.statrNr0zpsutil._common.stat.S_ISREGFr)r:pathabspath__file__rr2dirnamerr7OSErrorerrnoEPERMrr%EACCESENOENT)r+Z this_filer,r,r-test_isfile_strictks,       z#TestCommonModule.test_isfile_strictc Csrtrddlm}n ddlm}tjtjdd.t|}t dt j W5QRXW5QRX| }|ds~t|d|ksttdd|ksttjtjdd(t|}t td W5QRXW5QRX| }d |kstd |ksttjtjdd4t|}td d }d|_t |W5QRXW5QRX| }d |ks`td|ksntdS)Nr)StringIOZ PSUTIL_DEBUGTZhelloz psutil-debugz.pyc.pyzthis is an errorzignoring ValueErrorz'this is an error'r#z no such filez/foo)r iorrr7r8r'Z_commonrrsysstderrflushgetvaluermr2rr4rrfilename)r+rrrHexcr,r,r- test_debugs2         zTestCommonModule.test_debugc Cs|}t|d}|dW5QRXt|dks8tt|dksHtttt|dW5QRXttt|dW5QRXt|ddddkstt|ddddkstdS)NwrNsfooz-invalidr)fallback) Z get_testfnopenwriterr2rrr%r)r+Ztestfnrr,r,r- test_cat_bcats   zTestCommonModule.test_cat_bcatN) rbrcrdrrrrrrr,r,r,r-rs '!rrNza b cc@seZdZddZeZddZddZddZd d Zd d Z d dZ ddZ ddZ ddZ ddZddZddZejje ddddZdS) TestWrapNumberscCs tdSr)r rr*r,r,r-rszTestWrapNumbers.setUpcCs&dtdddi}t|d|ks"tdSNdisk1rUdisk_iontr r2r+inputr,r,r-test_first_callszTestWrapNumbers.test_first_callcCs8dtdddi}t|d|ks"tt|d|ks4tdSrrrr,r,r-test_input_hasnt_changedsz(TestWrapNumbers.test_input_hasnt_changedcCsdtdddi}t|d|ks"tdtdddi}t|d|ksDtdtdddi}t|d|ksftdtdddi}t|d|kstdS) NrrUr rrr,r,r-test_increase_but_no_wrapsz)TestWrapNumbers.test_increase_but_no_wrapcCsdtdddi}t|d|ks"tdtdddi}t|ddtdddiksPtdtdddi}t|ddtdddiks~tdtdddi}t|ddtdddikstdtdddi}t|ddtddd ikstdtdddi}t|ddtddd iks tdtd ddi}t|ddtd dd iks:tdtd ddi}t|ddtddd iksjtdtd ddi}t|ddtddd ikstdS) NrdrrnZr2(rrr,r,r- test_wraps$   zTestWrapNumbers.test_wrapcCstdtdddi}t|d|ks"ttdddtdddd}t|d|ksNtdtdddi}t|d|ksptdS)NrrUrrZdisk2rrr,r,r-test_changing_keyss z"TestWrapNumbers.test_changing_keyscCs0tdddtdddd}t|d|ks,ttdddtdddd}t|dtdddtddddksntdtdddi}t|d|ksttdddtdddd}t|d|ksttdddtdddd}t|d|ksttdddtdddd}t|dtdddtddddks,tdS)Nr rrrrrrrrr,r,r-test_changing_keys_w_wraps$    z)TestWrapNumbers.test_changing_keys_w_wrapcCsbddddd}t|d|ks tt|d|ks2tddddd}t|d}|dd d ks^tdS) N) i,#Rȷ) ir#itUiirrrr) 6ri$iNrri) iU ii"r ii4iii\)nvme0n1Z nvme0n1p1Z nvme0n1p2Z nvme0n1p3r) rrrrrrrrrrri)r r2)r+doutr,r,r-test_real_datas zTestWrapNumbers.test_real_datacCsbdtdddi}t|dt}|dd|iks6t|ddiiksJt|ddiiks^tdS)NrrUrrr]r#rr cache_infor2r+rcacher,r,r-test_cache_first_call(s  z%TestWrapNumbers.test_cache_first_callcCsdtdddi}t|ddtdddi}t|dt}|dd|iksPt|ddddddikslt|ddiikstdS) NrrUrrrr])rr)rr]rr#r#r#r%r,r,r-test_cache_call_twice0s   z%TestWrapNumbers.test_cache_call_twicecCsdtdddi}t|ddtdddi}t|dt}|dd|iksPt|ddddddikslt|dddtd giikstd d }dtdddi}t|dt}|dd|ikst|dtddd i}t|dt}|dd|ikst|dtddd i}t|dt}|dd|iksDt|ddddddiksbt|dddtd giikstdS)Nrrrrrr]r(r#r)cSsFt}|ddddddiks$t|dddtdgiiksBtdS) Nr]rrrr(r#rr))r r$r2r^)r&r,r,r-check_cache_infoKs z9TestWrapNumbers.test_cache_wrap..check_cache_inforrr )rr r$r2r^)r+rr&r+r,r,r-test_cache_wrap<s>        zTestWrapNumbers.test_cache_wrapcCsdtdddi}t|dtdddtdddd}t|dt}|dd|iksZt|ddddddiksvt|d diikstdS) NrrUrrrrr]r(r#r#r%r,r,r-test_cache_changing_keysns   z(TestWrapNumbers.test_cache_changing_keyscCs\dtdddi}t|dt|dtdtiiifksDttdtddS)NrrUrz?!?)rr rr$r2rr,r,r-test_cache_clearzs    z TestWrapNumbers.test_cache_clear not supportedreasoncCstrtstdttt}|D]}d|ksFtd|ks6tq6tjt}|D]}d|ksztd|ksjtqjtjt}|iiifkstdS)Nzno disks or NICs availablezpsutil.disk_io_counterszpsutil.net_io_counters) r'Zdisk_io_countersZnet_io_countersrskipr r$r2r)r+cachesr&r,r,r-test_cache_clear_public_apiss      z,TestWrapNumbers.test_cache_clear_public_apisN)rbrcrdrrrrrrrrr"r'r*r,r-r.rmarkskipifrr4r,r,r,r-rs    2  rzcan't locate scripts directoryr0c@seZdZdZeddZeddZddZej j e dd d d Z d d Z ddZddZddZej j eoxe dd ddZddZddZddZej j edd ddZej j e d d d!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Z d-d.Z!ej j e" d/d d0d1Z#d2d3Z$ej j e% d d d4d5Z&ej j e' d d d6d7Z(ej j e) d d ej j e* d8d d9d:Z+ej j e) d d ej j e* d8d d;d<Z,d=S)> TestScriptsz-Tests for scripts in the "scripts" directory.c Os|dtdtjt|}t|g}|D]}||q*zt|f| }Wn@t k r}z"dt |kr|t |WYSW5d}~XYnX|st ||S)Nenvz%sr<) setdefaultrr:rr{rrrr strip RuntimeErrorr3r2)exerrcmdargr!errr,r,r- assert_stdouts    zTestScripts.assert_stdoutc CsHtjt|}trt|ddnt|}|}W5QRXt|dS)Nutf8)encoding) r:rr{rr rreadastparse)r<rsrcr,r,r- assert_syntaxszTestScripts.assert_syntaxcCsVt|}ttD]>}|drdtj|d|kr|dtjt|qdS)NrZtest_rzno test defined for %r script) rlr:listdirrendswithrsplitextrtr{)r+Zmethsr/r,r,r- test_coverages  zTestScripts.test_coveragez POSIX onlyr0cCs`ttD]P\}}}|D]@}|drtj||}tjt|tj@s| d|qq dS)Nrz%r is not executable) r:walkrrIrr{statS_IXUSRST_MODErt)r+rootdirsfilesfilerr,r,r-test_executables  zTestScripts.test_executablecCs|ddS)Nz disk_usage.pyr@r*r,r,r-test_disk_usageszTestScripts.test_disk_usagecCs|ddS)Nzfree.pyrUr*r,r,r- test_freeszTestScripts.test_freecCs|ddS)Nz meminfo.pyrUr*r,r,r- test_meminfoszTestScripts.test_meminfocCs|dttdS)Nz procinfo.pyr@r3r:r;r*r,r,r- test_procinfoszTestScripts.test_procinfozno userscCs|ddS)Nzwho.pyrUr*r,r,r-test_whoszTestScripts.test_whocCs|ddS)Nzps.pyrUr*r,r,r-test_psszTestScripts.test_pscCs|ddS)Nz pstree.pyrUr*r,r,r- test_pstreeszTestScripts.test_pstreecCs|ddS)Nz netstat.pyrUr*r,r,r- test_netstatszTestScripts.test_netstatzQEMU user not supportedcCs|ddS)Nz ifconfig.pyrUr*r,r,r- test_ifconfigszTestScripts.test_ifconfigr/cCs|dttdS)Nzpmap.pyrYr*r,r,r- test_pmapszTestScripts.test_pmapcCs*dtjkrtd|ddS)NZussr/z procsmem.py)r'r)Zmemory_full_info_fieldsrr2r@r*r,r,r- test_procsmems zTestScripts.test_procsmemcCs|ddS)Nz killall.pyrGr*r,r,r- test_killallszTestScripts.test_killallcCs|ddS)Nz nettop.pyrcr*r,r,r- test_nettopszTestScripts.test_nettopcCs|ddS)Nztop.pyrcr*r,r,r-test_topszTestScripts.test_topcCs|ddS)Nziotop.pyrcr*r,r,r- test_iotopszTestScripts.test_iotopcCs,|dt}tt|ks(tdS)Nzpidof.py)r@r'r)r/r3r:r;r2)r+outputr,r,r- test_pidofszTestScripts.test_pidofz WINDOWS onlycCs|ddS)Nzwinservices.pyrUr*r,r,r-test_winservicesszTestScripts.test_winservicescCs|ddS)Nzcpu_distribution.pyrcr*r,r,r-test_cpu_distribution sz!TestScripts.test_cpu_distributioncCs tstd|ddS)Nzno temperaturesztemperatures.py)r'Zsensors_temperaturesrr2r@r*r,r,r-test_temperaturess zTestScripts.test_temperaturescCs tstd|ddS)Nzno fanszfans.py)r'Z sensors_fansrr2r@r*r,r,r- test_fanss zTestScripts.test_fansz no batterycCs|ddS)Nz battery.pyrUr*r,r,r- test_batteryszTestScripts.test_batterycCs|ddS)Nz sensors.pyrUr*r,r,r- test_sensorsszTestScripts.test_sensorsN)-rbrcrdrrrr@rGrKrr5r6rrTrVrWrXrZrr'Zusersr[r\r]r^rr_rr`rbrdrerfrgrirrjrkrrlrrmrrrnror,r,r,r-r7sP           r7):rrrD collectionsrrr:rrrMrr'Z psutil.testsrrZpsutil._commonrrrrrr r r r Zpsutil._compatr rrrrrrrrrrrrrrrrrrr r!r"rerr namedtuplerrr5r6rexistsr7r,r,r,r-sv                                8! h