MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_resource_warning

Method test_resource_warning

Lib/test/_test_multiprocessing.py:3008–3022  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3006 pool.join()
3007
3008 def test_resource_warning(self):
3009 if self.TYPE == 'manager':
3010 self.skipTest("test not applicable to manager")
3011
3012 pool = self.Pool(1)
3013 pool.terminate()
3014 pool.join()
3015
3016 # force state to RUN to emit ResourceWarning in __del__()
3017 pool._state = multiprocessing.pool.RUN
3018
3019 with warnings_helper.check_warnings(
3020 ('unclosed running multiprocessing pool', ResourceWarning)):
3021 pool = None
3022 support.gc_collect()
3023
3024def raising():
3025 raise KeyError("key")

Callers

nothing calls this directly

Calls 4

terminateMethod · 0.95
joinMethod · 0.95
skipTestMethod · 0.80
PoolMethod · 0.45

Tested by

no test coverage detected