def test_add_infiles(self): t = MQParam(TEMPLATE_PATH) t.add_infiles([('/path/Test1.mzXML', '/path/Test2.mzXML'), ('/path/Test3.mzXML', '/path/Test4.mzXML')]) assert [e.text for e in t._root.find('filePaths')] == ['/path/Test1.mzXML', '/path/Test2.mzXML', '/path/Test3.mzXML', '/path/Test4.mzXML'] assert [e.text for e in t._root.find('paramGroupIndices')] == ['0', '0', '1', '1'] assert t[1]
def test_translate(self): t = MQParam(TEMPLATE_PATH) t.add_infiles([('/posix/path/to/Test1.mzXML', '/posix/path/to/Test2.mzXML'), ('/path/dummy.mzXML',)]) # mqparam is not designed for windows t._root.find('filePaths')[2].text = r'D:\Windows\Path\Test3.mzXML' t.translate(('/galaxy/working/Test3.mzXML', '/galaxy/working/Test1.mzXML', '/galaxy/working/Test2.mzXML', '/galaxy/working/Test4.mzXML')) assert [e.text for e in t._root.find('filePaths')] == ['/galaxy/working/Test1.mzXML', '/galaxy/working/Test2.mzXML', '/galaxy/working/Test3.mzXML']