Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Sep 13, 2023
1 parent 464f655 commit 573408d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
outputs.append(param)
# Collection
collection = gxtp.OutputCollection("supercollection", label="a small label")
discover = gxtp.DiscoverDatasets("(?P<designation>.+)\.pdf.fasta", format="fasta")
discover = gxtp.DiscoverDatasets("(?P<designation>.+).pdf.fasta", format="fasta")
collection.append(discover)
outputs.append(collection)

Expand All @@ -111,7 +111,7 @@
rep_out.append(param)
test_a.append(rep_out)
test_coll = gxtp.TestOutputCollection(name="pdf_out")
test_elem = gxtp.TestOCElement(name="apdf",file="apdf",ftype="pdf")
test_elem = gxtp.TestOCElement(name="apdf", file="apdf", ftype="pdf")
test_coll.append(test_elem)
test_a.append(test_coll)
rep_out = gxtp.TestRepeat(name="output_repeat")
Expand Down
5 changes: 3 additions & 2 deletions examples/example_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import galaxyxml.tool.parameters as gxtp

# examplify the use of MacrosTool
#
#

tool = gxt.MacrosTool(
name="aragorn",
Expand Down Expand Up @@ -57,6 +57,7 @@
param_max.command_line_override = ""
param_min.space_between_arg = " "
param_max.space_between_arg = " "

inputs.append(param_min)
inputs.append(param_max)
inputs.append(posint)
Expand Down Expand Up @@ -84,7 +85,7 @@
outputs.append(param)
# Collection
collection = gxtp.OutputCollection("supercollection", label="a small label")
discover = gxtp.DiscoverDatasets("(?P<designation>.+)\.pdf.fasta", format="fasta")
discover = gxtp.DiscoverDatasets("(?P<designation>.+).pdf.fasta", format="fasta")
collection.append(discover)
outputs.append(collection)

Expand Down
7 changes: 4 additions & 3 deletions test/unit_test_import_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_stdio(self):
self.assertEqual(std.attrib["level"], "fatal")
self.assertEqual(std.attrib["range"], "1:")


class TestOverrides(TestImport):
def test_override(self):
co = "bash foo.sh > output1"
Expand Down Expand Up @@ -199,20 +200,20 @@ def test_collection_output(self):

def test_repeat(self):
repeat = self.tool.tests.children[0].node[3]
self.assertEqual(repeat.attrib["name"],"testrepeat")
self.assertEqual(repeat.attrib["name"], "testrepeat")
# test param within repeat
self.assertEqual(repeat[0].attrib["name"], "repeatchild")
self.assertEqual(repeat[0].attrib["value"], "foo")
# test output within repeat
output = self.tool.tests.children[0].node[4]
self.assertEqual(output.attrib["name"],"output_repeat")
self.assertEqual(output.attrib["name"], "output_repeat")
self.assertEqual(output[0].attrib["file"], "outputchild")
self.assertEqual(output[0].attrib["name"], "bar")

def test_ocr(self):
# test outputcollection within repeat - who knows...
output = self.tool.tests.children[0].node[5]
self.assertEqual(output.attrib["name"],"collection_repeat")
self.assertEqual(output.attrib["name"], "collection_repeat")
collection = output[0]
self.assertEqual(collection.attrib["name"], "collectionchild")
element = collection[0]
Expand Down

0 comments on commit 573408d

Please sign in to comment.