Commit 432d73be authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'fix_dill' into 'master'

Add recurse flag to dill dump

See merge request fsl/fslpy!339
parents a187f9cd 22cba1ff
Pipeline #14473 failed with stages
in 11 minutes and 46 seconds
......@@ -2,6 +2,16 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
3.9.3 (Friday 27th May 2022)
----------------------------
Fixed
^^^^^
* Fixed an issue in the :func:`.func_to_cmd` function (!339).
3.9.2 (Friday 20th May 2022)
----------------------------
......
......@@ -494,7 +494,7 @@ def func_to_cmd(func, args=None, kwargs=None, tmp_dir=None, clean="never", verbo
if kwargs is None:
kwargs = {}
dill_bytes = BytesIO()
dill.dump((func, args, kwargs), dill_bytes)
dill.dump((func, args, kwargs), dill_bytes, recurse=True)
handle, filename = tempfile.mkstemp(prefix=func.__name__ + '_',
suffix='.py',
......
......@@ -173,22 +173,6 @@ def test_add_to_parser():
assert res_flags[idx + start_index] == part
def myfunc():
print('standard output')
print('standard error', file=sys.stderr)
def test_func_to_cmd():
with fslsub_mockFSLDIR(), tempdir():
cmd = fslsub.func_to_cmd(myfunc, (), {})
jid = fslsub.submit(cmd)
stdout, stderr = fslsub.output(jid)
assert stdout.strip() == 'standard output'
assert stderr.strip() == 'standard error'
example_qstat_reply = """==============================================================
job_number: 9985061
exec_file: job_scripts/9985061
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment