Skip to content

Commit

Permalink
Make tests compatiable with python 2
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
ThomasHickman committed Sep 8, 2017
1 parent 67085d2 commit 18fb56b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gatkcwlgenerator/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def run_command(command, fail_message=None, expect_failure=False):
"" if fail_message is None else fail_message + ": ",
command,
exitcode,
stdout,
stderr
stdout.decode(),
stderr.decode()
))

return CommandOutput(stdout, stderr, exitcode)
return CommandOutput(stdout.decode(), stderr.decode(), exitcode)

class CommandOutput():
def __init__(self, stdout, stderr, exitcode):
Expand Down Expand Up @@ -73,7 +73,7 @@ def run_tool(toolname, extra_info, version, interval=1, filetext=None, expect_fa
extra_info += "\nintervals: [chr22:10591400-{}]".format(10591400 + interval)
filetext = "analysis_type: {}\n".format(toolname) + default_args + "\n" + extra_info

with tempfile.NamedTemporaryFile() as f:
with tempfile.NamedTemporaryFile("w+") as f:
f.write(filetext)
f.flush()
return run_command("cwl-runner gatk_cmdline_tools/{}/cwl/{}.cwl {}".format(
Expand Down

1 comment on commit 18fb56b

@ThomasHickman
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type here, fixes the tests in python 3

Please sign in to comment.