MCPcopy
hub / github.com/celery/celery / teardown

Function teardown

t/unit/conftest.py:287–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285
286
287def teardown():
288 # Don't want SUBDEBUG log messages at finalization.
289 try:
290 from multiprocessing.util import get_logger
291 except ImportError:
292 pass
293 else:
294 get_logger().setLevel(logging.WARNING)
295
296 # Make sure test database is removed.
297 import os
298 if os.path.exists('test.db'):
299 try:
300 os.remove('test.db')
301 except OSError:
302 pass
303
304 # Make sure there are no remaining threads at shutdown.
305 import threading
306 remaining_threads = [thread for thread in threading.enumerate()
307 if thread.getName() != 'MainThread']
308 if remaining_threads:
309 sys.stderr.write(
310 '\n\n**WARNING**: Remaining threads at teardown: %r...\n' % (
311 remaining_threads))
312
313
314def find_distribution_modules(name=__name__, file=__file__):

Callers

nothing calls this directly

Calls 3

get_loggerFunction · 0.90
removeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…