Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_Dialign_tool.DialignApplication Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_Dialign_simple
def test_Dialign_simple_with_options
def test_Dialign_simple_with_MSF_output
def test_Dialign_complex_command_line

Public Attributes

 infile1
 outfile1
 outfile2

Detailed Description

Definition at line 41 of file test_Dialign_tool.py.


Member Function Documentation

Definition at line 43 of file test_Dialign_tool.py.

00043 
00044     def setUp(self):
00045         self.infile1 = "Fasta/f002" 
00046         #Standard output file
00047         self.outfile1 = "Fasta/f002.ali"
00048         #MSF output
00049         self.outfile2 = "Fasta/f002.ms"

Definition at line 50 of file test_Dialign_tool.py.

00050 
00051     def tearDown(self):
00052         if os.path.isfile(self.outfile1):
00053             os.remove(self.outfile1)
00054         if os.path.isfile(self.outfile2):
00055             os.remove(self.outfile2)

Round-trip through app with complex command line.

Definition at line 95 of file test_Dialign_tool.py.

00095 
00096     def test_Dialign_complex_command_line(self):
00097         """Round-trip through app with complex command line."""
00098         cmdline = DialignCommandline(dialign_exe)
00099         cmdline.set_parameter("input", self.infile1)
00100         cmdline.set_parameter("-nt", True)
00101         cmdline.set_parameter("-thr", 4)
00102         cmdline.set_parameter("stars", 9)
00103         cmdline.set_parameter("-ow", True)
00104         cmdline.set_parameter("mask", True)
00105         cmdline.set_parameter("-cs", True)
00106         self.assertEqual(str(cmdline), dialign_exe + \
00107                          " -cs -mask -nt -ow -stars 9 -thr 4 Fasta/f002")
00108         stdout, stderr = cmdline()
00109         self.assertEqual(stderr, "")
00110         self.assertTrue(os.path.exists(self.outfile1))
00111         self.assertTrue(stdout.startswith(" e_len = 633"))
00112 

Simple round-trip through app with infile.

Definition at line 56 of file test_Dialign_tool.py.

00056 
00057     def test_Dialign_simple(self):
00058         """Simple round-trip through app with infile.
00059         """
00060         #Test using keyword arguments:
00061         cmdline = DialignCommandline(dialign_exe, input=self.infile1)
00062         self.assertEqual(str(cmdline), dialign_exe + " Fasta/f002")
00063         stdout, stderr = cmdline()
00064         self.assertEqual(stderr, "")
00065         self.assertEqual(stdout, "")
00066         self.assertTrue(os.path.exists(self.outfile1))

Simple round-trip through app with infile, output MSF

Definition at line 81 of file test_Dialign_tool.py.

00081 
00082     def test_Dialign_simple_with_MSF_output(self):
00083         """Simple round-trip through app with infile, output MSF
00084         """
00085         cmdline = DialignCommandline(dialign_exe)
00086         #Test with properties
00087         cmdline.input = self.infile1
00088         cmdline.msf = True
00089         self.assertEqual(str(cmdline), dialign_exe + " -msf Fasta/f002")
00090         stdout, stderr = cmdline()
00091         self.assertEqual(stderr, "")
00092         self.assertEqual(stdout, "")
00093         self.assertTrue(os.path.exists(self.outfile1))
00094         self.assertTrue(os.path.exists(self.outfile2))

Simple round-trip through app with infile and options

Definition at line 67 of file test_Dialign_tool.py.

00067 
00068     def test_Dialign_simple_with_options(self):
00069         """Simple round-trip through app with infile and options
00070         """
00071         cmdline = DialignCommandline(dialign_exe)
00072         cmdline.set_parameter("input", self.infile1)
00073         cmdline.set_parameter("-max_link", True)
00074         cmdline.set_parameter("stars", 4)
00075         self.assertEqual(str(cmdline), dialign_exe + \
00076                          " -max_link -stars 4 Fasta/f002")
00077         stdout, stderr = cmdline()
00078         self.assertEqual(stderr, "")
00079         self.assertEqual(stdout, "")
00080         self.assertTrue(os.path.exists(self.outfile1))


Member Data Documentation

Definition at line 44 of file test_Dialign_tool.py.

Definition at line 46 of file test_Dialign_tool.py.

Definition at line 48 of file test_Dialign_tool.py.


The documentation for this class was generated from the following file: