11 param = Parameter.from_idn(
'11106')
12 self.assertEqual(
Pattern(11106), param)
13 self.assertEqual(
Pattern(
'11106'), param)
14 self.assertEqual(
Pattern(
'id=11106'), param)
18 with self.assertRaises(ValueError):
20 with self.assertRaises(ValueError):
22 with self.assertRaises(ValueError):
26 with self.assertRaises(ValueError):
28 with self.assertRaises(ValueError):
30 with self.assertRaises(ValueError):
34 with self.assertRaises(ValueError):
36 with self.assertRaises(ValueError):
38 with self.assertRaises(ValueError):
42 individual =
Pattern(
'individual')
43 self.assertEqual(individual, Parameter.from_idn(11106))
44 self.assertNotEqual(individual, Parameter.from_idn(12382))
47 direction_u =
Pattern(
'direction=u')
48 self.assertEqual(direction_u, Parameter.from_idn(11106))
49 self.assertNotEqual(direction_u, Parameter.from_idn(11206))
52 operation_t =
Pattern(
'translation')
53 self.assertEqual(operation_t, Parameter.from_idn(11106))
54 self.assertNotEqual(operation_t, Parameter.from_idn(12106))
57 tu =
Pattern(
'direction=u & translation')
58 self.assertEqual(tu, Parameter.from_idn(11106))
59 self.assertNotEqual(tu, Parameter.from_idn(12106))
60 self.assertNotEqual(tu, Parameter.from_idn(11206))
63 stereo_tu =
Pattern(
'stereo & direction=u & translation')
64 self.assertNotEqual(stereo_tu, Parameter.from_idn(11106))
65 self.assertNotEqual(stereo_tu, Parameter.from_idn(12106))
66 self.assertNotEqual(stereo_tu, Parameter.from_idn(11206))
67 self.assertEqual(stereo_tu, Parameter.from_idn(11107))
71 self.assertEqual(tu, Parameter.from_idn(11106))
72 self.assertNotEqual(tu, Parameter.from_idn(12106))
73 self.assertNotEqual(tu, Parameter.from_idn(11206))
76 stereo_tu =
Pattern(
'stereo & tu')
77 self.assertNotEqual(stereo_tu, Parameter.from_idn(11106))
78 self.assertNotEqual(stereo_tu, Parameter.from_idn(12106))
79 self.assertNotEqual(stereo_tu, Parameter.from_idn(11206))
80 self.assertEqual(stereo_tu, Parameter.from_idn(11107))
83 if __name__ ==
'__main__':
Pattern that can match one or more paramters.
def test_bad_patterns(self)
def test_match_operation(self)
def test_combine_alias(self)
def test_combine_binary_and_unary(self)
def test_match_id_number(self)
def test_match_direction(self)
def test_match_unary(self)
def test_combine_binary(self)
representation of alignment parameters
pattern that can match one or more Parameters