()
| 285 | |
| 286 | |
| 287 | def 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 | |
| 314 | def find_distribution_modules(name=__name__, file=__file__): |
nothing calls this directly
no test coverage detected
searching dependent graphs…