def test_is_alive(self): ''' Test whether the cell knows it is alive. ''' c = GolCell(Alive()) assert c.is_alive() c = initialise_cell() assert not c.is_alive()
def test_is_alive(self): """ This method tests the ability of the GolCell to evaluate whether or not it is alive. The expected result of this test is for the evaluation to be successful. """ c = GolCell(Alive()) # Assert that the GolCell can evaluate itself as alive. assert c.is_alive() c = initialise_cell() # Assert that the GolCell can evaulate itself as dead. assert not c.is_alive()