Example #1
0
 def test_Dialign_simple_with_options(self):
     """Simple round-trip through app with infile and options."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-max_link", True)
     cmdline.set_parameter("stars", 4)
     self.assertEqual(str(cmdline), dialign_exe +
                      " -max_link -stars 4 Fasta/f002")
     stdout, stderr = cmdline()
     self.assertEqual(stderr, "")
     self.assertEqual(stdout, "")
     self.assertTrue(os.path.exists(self.outfile1))
Example #2
0
 def test_Dialign_simple_with_options(self):
     """Simple round-trip through app with infile and options."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-max_link", True)
     cmdline.set_parameter("stars", 4)
     self.assertEqual(str(cmdline), dialign_exe +
                      " -max_link -stars 4 Fasta/f002")
     stdout, stderr = cmdline()
     self.assertEqual(stderr, "")
     self.assertEqual(stdout, "")
     self.assertTrue(os.path.exists(self.outfile1))
 def test_Dialign_simple_with_options(self):
     """Simple round-trip through app with infile and options
     """
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-max_link", True)
     cmdline.set_parameter("stars", 4)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -max_link -stars 4 Fasta/f002")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(stderr.read(), "")
     self.assertEqual(stdout.read(), "")
     self.assertEqual(result.return_code, 0)
     self.assert_(os.path.exists(self.outfile1))
     self.assertEqual(str(result._cl), str(cmdline))
Example #4
0
 def test_Dialign_simple_with_options(self):
     """Simple round-trip through app with infile and options
     """
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-max_link", True)
     cmdline.set_parameter("stars", 4)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -max_link -stars 4 Fasta/f002")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(stderr.read(), "")
     self.assertEqual(stdout.read(), "")
     self.assertEqual(result.return_code, 0)
     self.assert_(os.path.exists(self.outfile1))
     self.assertEqual(str(result._cl), str(cmdline))
Example #5
0
 def test_Dialign_simple_with_options(self):
     """Simple round-trip through app with infile and options
     """
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-max_link", True)
     cmdline.set_parameter("stars", 4)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -max_link -stars 4 Fasta/f002")
     child = subprocess.Popen(str(cmdline),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              shell=(sys.platform!="win32"))
     return_code = child.wait()
     self.assertEqual(return_code, 0)
     self.assertEqual(child.stderr.read(), "")
     self.assertEqual(child.stdout.read(), "")
     self.assert_(os.path.exists(self.outfile1))
     del child
 def test_Dialign_complex_command_line(self):
     """Round-trip through app with complex command line."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-nt", True)
     cmdline.set_parameter("-thr", 4)
     cmdline.set_parameter("stars", 9)
     cmdline.set_parameter("-ow", True)
     cmdline.set_parameter("mask", True)
     cmdline.set_parameter("-cs", True)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(stderr.read(), "")
     self.assertEqual(result.return_code, 0)
     self.assert_(os.path.exists(self.outfile1))
     self.assert_(stdout.read().startswith(" e_len = 633"))
     self.assertEqual(str(result._cl), str(cmdline))
Example #7
0
 def test_Dialign_complex_command_line(self):
     """Round-trip through app with complex command line."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-nt", True)
     cmdline.set_parameter("-thr", 4)
     cmdline.set_parameter("stars", 9)
     cmdline.set_parameter("-ow", True)
     cmdline.set_parameter("mask", True)
     cmdline.set_parameter("-cs", True)
     self.assertEqual(str(cmdline), dialign_exe +
                      " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
     stdout, stderr = cmdline()
     self.assertEqual(stderr, "")
     self.assertTrue(os.path.exists(self.outfile1))
     self.assertTrue(stdout.startswith(" e_len = 633"))
Example #8
0
 def test_Dialign_complex_command_line(self):
     """Round-trip through app with complex command line."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-nt", True)
     cmdline.set_parameter("-thr", 4)
     cmdline.set_parameter("stars", 9)
     cmdline.set_parameter("-ow", True)
     cmdline.set_parameter("mask", True)
     cmdline.set_parameter("-cs", True)
     self.assertEqual(str(cmdline), dialign_exe +
                      " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
     stdout, stderr = cmdline()
     self.assertEqual(stderr, "")
     self.assertTrue(os.path.exists(self.outfile1))
     self.assertTrue(stdout.startswith(" e_len = 633"))
Example #9
0
 def test_Dialign_complex_command_line(self):
     """Round-trip through app with complex command line."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-nt", True)
     cmdline.set_parameter("-thr", 4)
     cmdline.set_parameter("stars", 9)
     cmdline.set_parameter("-ow", True)
     cmdline.set_parameter("mask", True)
     cmdline.set_parameter("-cs", True)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
     child = subprocess.Popen(str(cmdline),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              shell=(sys.platform!="win32"))
     return_code = child.wait()
     self.assertEqual(return_code, 0)
     self.assertEqual(child.stderr.read(), "")
     self.assert_(os.path.exists(self.outfile1))
     self.assert_(child.stdout.read().startswith(" e_len = 633"))
     del child
Example #10
0
 def test_Dialign_complex_command_line(self):
     """Round-trip through app with complex command line."""
     cmdline = DialignCommandline(dialign_exe)
     cmdline.set_parameter("input", self.infile1)
     cmdline.set_parameter("-nt", True)
     cmdline.set_parameter("-thr", 4)
     cmdline.set_parameter("stars", 9)
     cmdline.set_parameter("-ow", True)
     cmdline.set_parameter("mask", True)
     cmdline.set_parameter("-cs", True)
     self.assertEqual(str(cmdline), dialign_exe + \
                      " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(stderr.read(), "")
     self.assertEqual(result.return_code, 0)
     self.assert_(os.path.exists(self.outfile1))
     self.assert_(stdout.read().startswith(" e_len = 633"))
     self.assertEqual(str(result._cl), str(cmdline))