Exemplo n.º 1
0
 def test_walk_deterministic1(self):
     chain = Chain({(1,): {2: 1}, (2,): {3: 1}, (3,): {None: 1}})
     chain.make_deterministic_map()
     test = list(chain.walk_deterministic_until((1,), 3))
     check = (1, 2, 3)
     for t, c in zip(test, check):
         self.assertEqual(t, c)
Exemplo n.º 2
0
 def test_walk_deterministic2(self):
     chain = Chain({(1,): {2: 1}, (2,): {3: 1}, (3,): {None: 1}})
     chain.make_deterministic_map()
     test1 = list(chain.walk_deterministic_until((1,), 2))
     test2 = list(chain.walk_deterministic_until((3,), 2))
     check1 = (1, 2)
     check2 = (3, None)
     for t, c in zip(test1, check1):
         self.assertEqual(t, c)
     for t, c in zip(test2, check2):
         self.assertEqual(t, c)