Index: test/dosep.py =================================================================== --- test/dosep.py +++ test/dosep.py @@ -1350,6 +1350,11 @@ runner_strategies_by_name.keys())) test_runner_func = runner_strategies_by_name[test_runner_name] + # On Windows, Python uses CRT with a low limit on the number of open files. + # Capping the number of threads avoids "OSError: too many open files." + if os.name == 'nt' and num_threads > 32: + num_threads = 32 + summary_results = walk_and_invoke( test_directory, test_subdir, dotest_argv, num_threads, test_runner_func)