diff options
author | Michael Merickel <michael@merickel.org> | 2020-11-26 13:47:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 13:47:33 -0600 |
commit | 29bd138f98e157cddb8ae9e45bf2c33b0a868978 (patch) | |
tree | e06a61987130ea5c9da373865cbb063f15a12f41 | |
parent | 31d7498c84cf0041f37beb503fd0ddf78d9d41e2 (diff) | |
parent | ab5bbaea511994a543de84bf4d2197551a45142b (diff) | |
download | waitress-29bd138f98e157cddb8ae9e45bf2c33b0a868978.tar.gz |
Merge pull request #327 from Pylons/speedup-test-suite
If we are not on Windows use fork for multiprocessing
-rw-r--r-- | tests/test_functional.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py index f8ceabf..04a2df4 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -12,6 +12,7 @@ import time import unittest from waitress import server +from waitress.compat import WIN from waitress.utilities import cleanup_unix_socket dn = os.path.dirname @@ -76,7 +77,12 @@ class SubprocessTests: if "COVERAGE_RCFILE" in os.environ: os.environ["COVERAGE_PROCESS_START"] = os.environ["COVERAGE_RCFILE"] - self.proc = multiprocessing.Process( + if not WIN: + ctx = multiprocessing.get_context("fork") + else: + ctx = multiprocessing.get_context("spawn") + + self.proc = ctx.Process( target=start_server, args=(target, self.server, self.queue), kwargs=kw, |