Django test --parallel on macOS ignores settings overridden in a custom DiscoverRunner.setup_test_environment
Settings overridden in a custom DiscoverRunner subclass's setup_test_environment() (for example override_settings(...).enable() for a fast password hasher or to blank out API keys read from a local .env) apply when tests run serially but not under manage.py test --parallel on macOS. A test that passes serially then fails only in parallel, and the failure can be hidden behind TypeError: cannot pickle 'traceback' object raised from django/test/runner.py check_picklable, because the real assertion error holds an unpicklable object (here a lambda in the assertion message).
Root cause: macOS uses the 'spawn' multiprocessing start method, so each parallel worker is a fresh interpreter. django/test/runner.py _init_worker then calls django.setup() and the module-level django.test.utils.setup_test_environment(debug=...), not the runner instance's setup_test_environment method, so anything the subclass enabled in the parent process never exists in the workers (on Linux with 'fork' the workers inherit it, which is why CI can pass). Fixes: put test-only settings somewhere the worker also loads (a test settings module, or environment variables set before settings import), or pass a process_setup callable through the runner's parallel suite (_init_worker accepts process_setup/process_setup_args and calls it before django.setup() in spawned workers). To see the real failure behind the pickle error, rerun the failing app serially.