diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-09-12 20:58:26 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-09-14 22:52:04 +0200 |
| commit | 2425f6fda099a2134dbf72c8a30270cc9a659f1e (patch) | |
| tree | fe4d795cecde6a46e4bb691714e8ca7e2202dddd /tests | |
| parent | 64d7a553e1be20174b0aa2882111049abf392d4f (diff) | |
Prevented --parallel from crashing on Windows.
Since --parallel is documented not to work on Windows, it's better to
ignore it and run without parallelization than to crash. For example
this could simplify cross-platform test scripts.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/runtests.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 4d6e22e3b2..cfc8722ae2 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -236,11 +236,8 @@ def teardown(state): def actual_test_processes(parallel): if parallel == 0: - # On Python 3.4+: if multiprocessing.get_start_method() != 'fork': - if not hasattr(os, 'fork'): - return 1 # This doesn't work before django.setup() on some databases. - elif all(conn.features.can_clone_databases for conn in connections.all()): + if all(conn.features.can_clone_databases for conn in connections.all()): return default_test_processes() else: return 1 |
