projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial port to python3
[htsworkflow.git]
/
htsworkflow
/
pipelines
/
test
/
test_retrive_config.py
diff --git
a/htsworkflow/pipelines/test/test_retrive_config.py
b/htsworkflow/pipelines/test/test_retrive_config.py
index 1d0404aa42ec16baff63780f9afa7298e7d04f9b..6e6155c915c814cabc3c05ab2bc5ea0bd188fc09 100644
(file)
--- a/
htsworkflow/pipelines/test/test_retrive_config.py
+++ b/
htsworkflow/pipelines/test/test_retrive_config.py
@@
-1,11
+1,11
@@
import csv
import os
import re
import csv
import os
import re
-from
StringIO
import StringIO
+from
io
import StringIO
try:
import json
try:
import json
-except ImportError
,
e:
+except ImportError
as
e:
import simplejson as json
from django.test import TestCase
import simplejson as json
from django.test import TestCase
@@
-28,7
+28,7
@@
class RetrieveTestCases(TestCase):
flowcell_info = json.loads(flowcell_request.content)
options = getCombinedOptions(['-f','FC12150','-g',os.getcwd()])
flowcell_info = json.loads(flowcell_request.content)
options = getCombinedOptions(['-f','FC12150','-g',os.getcwd()])
- genome_map = {
u
'Homo sapiens': '/tmp/hg18' }
+ genome_map = {'Homo sapiens': '/tmp/hg18' }
config = format_gerald_config(options, flowcell_info, genome_map)
config_lines = config.split('\n')
config = format_gerald_config(options, flowcell_info, genome_map)
config_lines = config.split('\n')
@@
-54,7
+54,7
@@
class RetrieveTestCases(TestCase):
output = StringIO()
save_sample_sheet(output, options, flowcell_info)
output = StringIO()
save_sample_sheet(output, options, flowcell_info)
- print
output.buf
+ print
(output.buf)
output.seek(0)
sheet = list(csv.DictReader(output))
output.seek(0)
sheet = list(csv.DictReader(output))
@@
-81,6
+81,6
@@
class RetrieveTestCases(TestCase):
]
self.failUnlessEqual(len(sheet), len(expected))
for s, e in zip(sheet, expected):
]
self.failUnlessEqual(len(sheet), len(expected))
for s, e in zip(sheet, expected):
- for key in
e.keys(
):
+ for key in
list(e.keys()
):
self.failUnlessEqual(s[key], e[key],
"%s != %s for key %s" % (s[key],e[key], key))
self.failUnlessEqual(s[key], e[key],
"%s != %s for key %s" % (s[key],e[key], key))