-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX globals for functions defined in __main__ (#188)
Fix #187 The cause of this issue is that global variables defined in `__main__` are not shared by unpickled functions and their value are overwritten at each unpickling.
- Loading branch information
Showing
6 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[run] | ||
branch = True | ||
parallel = True | ||
source = cloudpickle | ||
|
||
[report] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Make it possible to enable test coverage reporting for Python | ||
# code run in children processes. | ||
# http://coverage.readthedocs.io/en/latest/subprocess.html | ||
|
||
import os.path as op | ||
from distutils.sysconfig import get_python_lib | ||
|
||
FILE_CONTENT = u"""\ | ||
import coverage; coverage.process_startup() | ||
""" | ||
|
||
filename = op.join(get_python_lib(), 'coverage_subprocess.pth') | ||
with open(filename, 'wb') as f: | ||
f.write(FILE_CONTENT.encode('ascii')) | ||
|
||
print('Installed subprocess coverage support: %s' % filename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters