Skip to content

Commit 7b0e3c5

Browse files
committed
Set a default value of os.environ['NUMBER_OF_PROCESSORS'] on windows
If this environment variable is not set, multiprocessing throws a NotImplementedError
1 parent be4441a commit 7b0e3c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/tests/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# -*- coding: utf-8 flake8: noqa -*-
2+
import os
3+
import sys
4+
5+
6+
if sys.platform.startswith('win'):
7+
os.environ.setdefault('NUMBER_OF_PROCESSORS', '1')
8+
9+
210
from .test_compiler import *
311
from .test_compressor import *
412
from .test_template import *

0 commit comments

Comments
 (0)