def test_get_result_path(self): """Tests mltree result path""" m = mltree(InputHandler='_input_as_lines') res = m(self.input) self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus']) self.assertEqual(res['ExitStatus'],0) res.cleanUp()
def test_input_as_lines(self): """Test mltree input as lines""" m = mltree(InputHandler='_input_as_lines') res = m(self.input) self.assertEqual(res['ExitStatus'],0) assert res['StdOut'] is not None res.cleanUp()
def test_input_as_string(self): """Test mltree input as string""" m = mltree() f = open('/tmp/single.col','w') txt = '\n'.join([str(i).strip('\n') for i in self.input]) f.write(txt) f.close() res = m('/tmp/single.col') self.assertEqual(res['ExitStatus'],0) assert res['StdOut'] is not None res.cleanUp() remove('/tmp/single.col')