Back to index

python-biopython  1.60
Public Member Functions | Static Public Attributes
test_psw.TestPSW Class Reference
Collaboration diagram for test_psw.TestPSW:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_Alignment_normal
def test_Alignment_assertions
def test_AlignmentColumn_kinds
def test_AlignmentColumn_repr
def test_AlignmentColumn_full
def test_AlignmentColumn_assertions
def test_ColumnUnit

Static Public Attributes

string PARSED = "[SEQUENCE(39, 22), SEQUENCE(40, 23), SEQUENCE(41, 24), SEQUENCE(42, 25), SEQUENCE(43, 26), SEQUENCE(44, 27), END(0, 27)]"

Detailed Description

Definition at line 18 of file test_psw.py.


Member Function Documentation

Definition at line 31 of file test_psw.py.

00031 
00032     def test_Alignment_assertions(self):
00033         a = psw.Alignment()
00034 
00035         self.assertRaises(AssertionError, a.append, psw.ColumnUnit(1, 200, "SEQUENCE"))
00036         a.append(psw.ColumnUnit(0, 98, "SEQUENCE"))
00037         self.assertRaises(AssertionError, a.append, psw.ColumnUnit(0, 200, "SEQUENCE"))
00038         a.append(psw.ColumnUnit(1, 200, "SEQUENCE"))
00039         self.assertRaises(AssertionError, a.append, psw.ColumnUnit(1, 200, "SEQUENCE"))

Definition at line 19 of file test_psw.py.

00019 
00020     def test_Alignment_normal(self):
00021         a = psw.Alignment()
00022 
00023         a.append(psw.ColumnUnit(0, 98, "SEQUENCE"))
00024         a.append(psw.ColumnUnit(1, 200, "SEQUENCE"))
00025         a.append(psw.ColumnUnit(0, 98, "INSERT"))
00026         a.append(psw.ColumnUnit(1, 201, "SEQUENCE"))
00027         a.append(psw.ColumnUnit(0, 98, "END"))
00028         a.append(psw.ColumnUnit(1, 201, "END"))
00029 
00030         self.assertEqual(str(a), "[SEQUENCE(98, 200), INSERT(98, 201), END(98, 201)]")

Definition at line 67 of file test_psw.py.

00067 
00068     def test_AlignmentColumn_assertions(self):
00069         self.assertRaises(AssertionError, psw.AlignmentColumn, psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))
00070 
00071         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00072         self.assertRaises(AssertionError, ac.append, psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00073 

Definition at line 62 of file test_psw.py.

00062 
00063     def test_AlignmentColumn_full(self):
00064         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00065         ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "END"))
00066         self.assertRaises(psw.AlignmentColumnFullException, ac.append, psw.ColumnUnit(1, random.randint(0, 9999), "END"))

Definition at line 40 of file test_psw.py.

00040 
00041     def test_AlignmentColumn_kinds(self):
00042         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00043         ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "INSERT"))
00044         self.assertEqual(ac.kind, "INSERT")
00045 
00046         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "INSERT"))
00047         ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))
00048         self.assertEqual(ac.kind, "INSERT")
00049 
00050         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00051         ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))
00052         self.assertEqual(ac.kind, "SEQUENCE")
00053 
00054         ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
00055         ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "END"))
00056         self.assertEqual(ac.kind, "END")

Definition at line 57 of file test_psw.py.

00057 
00058     def test_AlignmentColumn_repr(self):
00059         ac = psw.AlignmentColumn(psw.ColumnUnit(0, 34, "SEQUENCE"))
00060         ac.append(psw.ColumnUnit(1, 55, "END"))
00061         self.assertEqual(repr(ac), "END(34, 55)")

Definition at line 74 of file test_psw.py.

00074 
00075     def test_ColumnUnit(self):
00076         self.assertEqual(repr(psw.ColumnUnit(0, 33, "SEQUENCE")),
00077                          "ColumnUnit(unit=0, column=33, SEQUENCE)")
00078 
00079         self.assertEqual(repr(psw.ColumnUnit(1, 33, "INSERT")),
00080                          "ColumnUnit(unit=1, column=33, INSERT)")
00081 
00082         self.assertEqual(repr(psw.ColumnUnit(1, 33, "END")),
00083                          "ColumnUnit(unit=1, column=33, END)")


Member Data Documentation

string test_psw.TestPSW.PARSED = "[SEQUENCE(39, 22), SEQUENCE(40, 23), SEQUENCE(41, 24), SEQUENCE(42, 25), SEQUENCE(43, 26), SEQUENCE(44, 27), END(0, 27)]" [static]

Definition at line 84 of file test_psw.py.


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