Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
Revert "test_runner: Monkey-patch to allow using multiprocessing in tests."
Anders Kaseorg8c2d478e6a69
diff --git a/zerver/lib/test_runner.py b/zerver/lib/test_runner.pyindex c35766e6bdd..da0cdcdd42f 100644--- a/zerver/lib/test_runner.py+++ b/zerver/lib/test_runner.py@@ -4,7 +4,7 @@ import randomimport shutilimport unittestfrom functools import partial-from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, Union, cast+from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, Unionfrom unittest import TestLoader, TestSuite, runnerfrom unittest.result import TestResult@@ -123,17 +123,6 @@ def run_subsuite(args: SubsuiteArgs) -> Tuple[int, Any]:return subsuite_index, result.events-# Monkey-patch django.test.runner to allow using multiprocessing-# inside tests without a “daemonic processes are not allowed to have-# children” error.-class NoDaemonContext(multiprocessing.context.ForkContext):- class Process(multiprocessing.context.ForkProcess):- daemon = cast(bool, property(lambda self: False, lambda self, value: None))---django_runner.multiprocessing = NoDaemonContext()--def destroy_test_databases(worker_id: Optional[int] = None) -> None:for alias in connections:connection = connections[alias]