§ v<ˆj9ãóX—dZddlZddlZddlmZddlmZddlmZGd„d¦«Z dS)z3 Helpers for working with Zope and its components. éN)ÚSet)ÚgetSiteManager)Ú Componentscó|—eZdZUdZdZeed<e¦«Ze ded<dZ eed<d„Z d„Z e d„¦«Zd S) ÚTestComponentszÓ A helper for providing a sterile registry when testing with ``zope.component``. Instantiation will install an empty registry that will be returned by :func:`zope.component.getSiteManager`. FÚ__test__Ú instancesÚ atexit_setupcó‡—td¦«‰_tjˆfd„¦«‰_‰j ‰¦«‰jjs'tj ‰j ¦«d‰j_dSdS)NÚTestingcó•—‰jS)N)Úregistry©Úselfs€úi/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/testfixtures/components.pyúz)TestComponents.__init__..s ø€¸d¼m€óT) rrrÚsethookÚoldr ÚaddÚ __class__r ÚatexitÚregisterrs`rÚ__init__zTestComponents.__init__s}ø€Ý$.¨yÑ$9Ô$9ˆŒ Ý-Ô5Ð6KÐ6KÐ6KÐ6KÑLÔLˆŒØ Œ×Ò˜4Ñ Ô Ð ØŒ~Ô*ð /Ý ŒO˜DœKÑ (Ô (Ð (Ø*.ˆDŒNÔ 'Ð 'Ð 'ð /ð /rcól—tj|j¦«|j |¦«dS)z¡ Remove the sterile registry and replace it with the one that was in place before this :class:`TestComponents` was instantiated. N)rrrr Úremovers rÚ uninstallzTestComponents.uninstall!s3€õ Ô˜tœxÑ(Ô(Ð(Ø Œ×Ò˜dÑ#Ô#Ð#Ð#Ð#rcó@—|jrtjd¦«dSdS)Nz5TestComponents instances not uninstalled by shutdown!)r ÚwarningsÚwarn)Úclss rrzTestComponents.atexit*s7€à Œ=ð Ý ŒMØGñ ô ð ð ð ð ð rN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚboolÚ__annotations__Úsetr rr rrÚ classmethodr©rrrr s—€€€€€€ððð€HˆdÐÐÑà'* s¡u¤u€IˆsÐ#Ô$Ð,Ð,Ñ,Ø€L�$ÐÐÑð/ð/ð/ð$ð$ð$ðððñ„[ðððrr) r%rrÚtypingrÚzope.componentrÚzope.interface.registryrrr*rrúr.s‹ðððð€ € € Ø€€€ØÐÐÐÐÐà)Ð)Ð)Ð)Ð)Ð)Ø.Ð.Ð.Ð.Ð.Ð.ð#ð#ð#ð#ð#ñ#ô#ð#ð#ð#r