Esempio n. 1
0
 def test_flasher(self):
     alive_cons = [(0, 1),
                   (1, 1),
                   (2, 1)]
     new_alive_cons = [(1, 0),
                       (1, 1),
                       (1, 2)]
     assert set(main.new_step(alive_cons)) == set(new_alive_cons)
Esempio n. 2
0
 def test_glader(self):
     alive_cons = [(1, 2),
                   (2, 3),
                   (3, 1),
                   (3, 2),
                   (3, 3)]
     new_alive_cons = [(2, 1),
                       (2, 3),
                       (3, 2),
                       (3, 3),
                       (4, 2)]
     assert set(main.new_step(alive_cons)) == set(new_alive_cons)