- Python 3.x
- pytest
- pytest-cov
- pytest-mock (version 3.3.1)
- pygame
You can install these dependencies using pip:
pip install pytest pytest-cov pytest-mock==3.3.1 pygameThe project has the following structure:
coderetreat-2023-game-of-life/
├── app/
│ └── main.py
├── tests/
│ └── test_gol.py
├── README.md
app/main.py: This is the main file of the Game of Life application.tests/test_gol.py: This is the test suite for the Game of Life.
We use pytest for running our tests. To execute the test suite, open a terminal, navigate to the project's root directory, and run the following command:
pytestThis will discover and run all the tests in the tests/ directory. The pytest-cov plugin is also included, which will generate code coverage reports.
To run the Game of Life, you can execute main.py:
python app/main.py