File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
nipype/pipeline/plugins/tests Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,22 @@ def test_scipy_sparse():
2020
2121def test_report_crash ():
2222 with mock .patch ('pickle.dump' , mock .MagicMock ()) as mock_pickle_dump :
23- mock_pickle_dump .return_value = True
24- mock_node = mock .MagicMock (name = 'mock_node' )
25- mock_node ._id = 'an_id'
26- mock_node .config = {
27- 'execution' : {
28- 'crashdump_dir' : '.'
23+ with mock .patch ('nipype.pipeline.plugins.base.format_exception' , mock .MagicMock ()): # see iss 1517
24+ mock_pickle_dump .return_value = True
25+ mock_node = mock .MagicMock (name = 'mock_node' )
26+ mock_node ._id = 'an_id'
27+ mock_node .config = {
28+ 'execution' : {
29+ 'crashdump_dir' : '.'
30+ }
2931 }
30- }
3132
32- actual_crashfile = pb .report_crash (mock_node )
33+ actual_crashfile = pb .report_crash (mock_node )
3334
34- expected_crashfile = re .compile ('.*/crash-.*-an_id-[0-9a-f\-]*.pklz' )
35+ expected_crashfile = re .compile ('.*/crash-.*-an_id-[0-9a-f\-]*.pklz' )
3536
36- yield assert_regexp_matches , actual_crashfile , expected_crashfile
37- yield assert_true , mock_pickle_dump .call_count == 1
37+ yield assert_regexp_matches , actual_crashfile , expected_crashfile
38+ yield assert_true , mock_pickle_dump .call_count == 1
3839
3940'''
4041Can use the following code to test that a mapnode crash continues successfully
You can’t perform that action at this time.
0 commit comments