Skip to content

Commit 21de4c3

Browse files
committed
make tests work in non-ASCII locales
1 parent e7e479b commit 21de4c3

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

tests/test_examples.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,25 +379,27 @@ def test_typecomparestrict(self):
379379

380380
def test_recordcompare(self):
381381
src = {
382-
'fields': [{
383-
'type': {'items': 'string', 'type': 'array'},
384-
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/wf-variantcall.cwl#vc_rec/vc_rec/description'
385-
},
386-
{
387-
'type': {'items': 'File', 'type': 'array'},
388-
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/wf-variantcall.cwl#vc_rec/vc_rec/vrn_file'
382+
'fields': [
383+
{'type': {'items': 'string', 'type': 'array'},
384+
'name': u'file:///home/chapmanb/drive/work/cwl/'
385+
'test_bcbio_cwl/run_info-cwl-workflow/wf-variantcall.cwl#vc_rec/vc_rec/description'
386+
},
387+
{'type': {'items': 'File', 'type': 'array'},
388+
'name': u'file:///home/chapmanb/drive/work/cwl/'
389+
'test_bcbio_cwl/run_info-cwl-workflow/wf-variantcall.cwl#vc_rec/vc_rec/vrn_file'
389390
}],
390391
'type': 'record',
391392
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/wf-variantcall.cwl#vc_rec/vc_rec'
392393
}
393394
sink = {
394-
'fields': [{
395-
'type': {'items': 'string', 'type': 'array'},
396-
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/steps/vc_output_record.cwl#vc_rec/vc_rec/description'
397-
},
398-
{
399-
'type': {'items': 'File', 'type': 'array'},
400-
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/steps/vc_output_record.cwl#vc_rec/vc_rec/vrn_file'
395+
'fields': [
396+
{'type': {'items': 'string', 'type': 'array'},
397+
'name': u'file:///home/chapmanb/drive/work/cwl/'
398+
'test_bcbio_cwl/run_info-cwl-workflow/steps/vc_output_record.cwl#vc_rec/vc_rec/description'
399+
},
400+
{'type': {'items': 'File', 'type': 'array'},
401+
'name': u'file:///home/chapmanb/drive/work/cwl/'
402+
'test_bcbio_cwl/run_info-cwl-workflow/steps/vc_output_record.cwl#vc_rec/vc_rec/vrn_file'
401403
}],
402404
'type': 'record',
403405
'name': u'file:///home/chapmanb/drive/work/cwl/test_bcbio_cwl/run_info-cwl-workflow/steps/vc_output_record.cwl#vc_rec/vc_rec'}
@@ -621,7 +623,7 @@ def get_main_output(self, new_args):
621623
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
622624

623625
stdout, stderr = process.communicate()
624-
return process.returncode, stdout.decode(), stderr.decode()
626+
return process.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
625627

626628

627629
class TestJsConsole(TestCmdLine):

0 commit comments

Comments
 (0)