Skip to content

Commit 26e4db4

Browse files
authored
Merge pull request #1557 from AnswerDotAI/fix/1256-fix-macos-forkserver
fix-macos-forkserver
2 parents b672a98 + 9ed00fa commit 26e4db4

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

nbdev/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def nbdev_test(
8686

8787
if n_workers is None: n_workers = 0 if len(files)==1 else min(num_cpus(), 8)
8888
if IN_NOTEBOOK: kw = {'method':'spawn'} if os.name=='nt' else {'method':'forkserver'}
89-
else: kw = {}
89+
else: kw = {'method':'forkserver'} if sys.platform=='darwin' else {}
9090
wd_pth = get_config().nbs_path
9191
with working_directory(wd_pth if (wd_pth and wd_pth.exists()) else os.getcwd()):
9292
results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers,

nbs/api/12_test.ipynb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
"\n",
181181
" if n_workers is None: n_workers = 0 if len(files)==1 else min(num_cpus(), 8)\n",
182182
" if IN_NOTEBOOK: kw = {'method':'spawn'} if os.name=='nt' else {'method':'forkserver'}\n",
183-
" else: kw = {}\n",
183+
" else: kw = {'method':'forkserver'} if sys.platform=='darwin' else {}\n",
184184
" wd_pth = get_config().nbs_path\n",
185185
" with working_directory(wd_pth if (wd_pth and wd_pth.exists()) else os.getcwd()):\n",
186186
" results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers,\n",
@@ -261,13 +261,7 @@
261261
"source": []
262262
}
263263
],
264-
"metadata": {
265-
"kernelspec": {
266-
"display_name": "python3",
267-
"language": "python",
268-
"name": "python3"
269-
}
270-
},
264+
"metadata": {},
271265
"nbformat": 4,
272266
"nbformat_minor": 5
273267
}

0 commit comments

Comments
 (0)