(self)
| 5826 | |
| 5827 | class TestNoForkBomb(unittest.TestCase): |
| 5828 | def test_noforkbomb(self): |
| 5829 | sm = multiprocessing.get_start_method() |
| 5830 | name = os.path.join(os.path.dirname(__file__), 'mp_fork_bomb.py') |
| 5831 | if sm != 'fork': |
| 5832 | rc, out, err = test.support.script_helper.assert_python_failure(name, sm) |
| 5833 | self.assertEqual(out, b'') |
| 5834 | self.assertIn(b'RuntimeError', err) |
| 5835 | else: |
| 5836 | rc, out, err = test.support.script_helper.assert_python_ok(name, sm) |
| 5837 | self.assertEqual(out.rstrip(), b'123') |
| 5838 | self.assertEqual(err, b'') |
| 5839 | |
| 5840 | # |
| 5841 | # Issue #17555: ForkAwareThreadLock |
nothing calls this directly
no test coverage detected