bg9XdZddlZddlZddlmZddlmZddlmZGddZ dS)z3 Helpers for working with Zope and its components. N)Set)getSiteManager) Componentsc|eZdZUdZdZeed<eZe ded<dZ eed<dZ dZ e dZd 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_setupctd_tjfd_jjjs'tj j dj_dSdS)NTestingcjS)N)registryselfsh/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/testfixtures/components.pyz)TestComponents.__init__..s dmT) rrrsethookoldr add __class__r atexitregisterrs`r__init__zTestComponents.__init__s}$.y$9$9 -56K6K6K6KLL 4   ~* / ODK ( ( (*.DN ' ' ' / /rcltj|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 tx((( d#####rc@|jrtjddSdS)Nz5TestComponents instances not uninstalled by shutdown!)r warningswarn)clss rrzTestComponents.atexit*s7 =  MG       rN)__name__ __module__ __qualname____doc__rbool__annotations__setr rr rr classmethodrrrrr sHd'*suuIs#$,,,L$///$$$[rr) r%rrtypingrzope.componentrzope.interface.registryrrr*rrr.s ))))))......##########r