MCPcopy Create free account
hub / github.com/celery/celery / setup_method

Method setup_method

t/unit/apps/test_worker.py:138–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 """
137
138 def setup_method(self):
139 state.should_stop = None
140 state.should_terminate = None
141 # Avoid touching real OS signal state: celery.platforms.signals
142 # normally calls signal.signal() on assignment, which we don't want
143 # running inside a test process. _shutdown_handler only needs
144 # somewhere to stash the closure it builds.
145 self._signals_patch = patch('celery.apps.worker.platforms.signals', {})
146 self.fake_signals = self._signals_patch.start()
147
148 def teardown_method(self):
149 self._signals_patch.stop()

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected