Example #1
0
    def test_AlignmentColumn_kinds(self):
        ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
        ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "INSERT"))
        self.assertEqual(ac.kind, "INSERT")

        ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "INSERT"))
        ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))
        self.assertEqual(ac.kind, "INSERT")

        ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
        ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))
        self.assertEqual(ac.kind, "SEQUENCE")

        ac = psw.AlignmentColumn(psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
        ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "END"))
        self.assertEqual(ac.kind, "END")
Example #2
0
    def test_AlignmentColumn_assertions(self):
        self.assertRaises(
            AssertionError, psw.AlignmentColumn,
            psw.ColumnUnit(1, random.randint(0, 9999), "SEQUENCE"))

        ac = psw.AlignmentColumn(
            psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
        self.assertRaises(
            AssertionError, ac.append,
            psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
Example #3
0
 def test_AlignmentColumn_full(self):
     ac = psw.AlignmentColumn(
         psw.ColumnUnit(0, random.randint(0, 9999), "SEQUENCE"))
     ac.append(psw.ColumnUnit(1, random.randint(0, 9999), "END"))
     self.assertRaises(psw.AlignmentColumnFullException, ac.append,
                       psw.ColumnUnit(1, random.randint(0, 9999), "END"))
Example #4
0
 def test_AlignmentColumn_repr(self):
     ac = psw.AlignmentColumn(psw.ColumnUnit(0, 34, "SEQUENCE"))
     ac.append(psw.ColumnUnit(1, 55, "END"))
     self.assertEqual(repr(ac), "END(34, 55)")