You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gameoflife/tests/test_anime.py

12 lines
375 B

import pytest
import conway.anime as anime
import conway.gameoflife as gol
class TestPlotlyAnimation:
state = gol.State(10, 10, "random")
steps = 10
plotly_anime = anime.PlotlyAnimation(state, steps)
def test_frame_gen(self):
assert self.plotly_anime.frames.shape == (11,10,10)
assert len(self.plotly_anime.frame_gen()) == 2 * self.steps + 1