osso73 / classic_games

A series of classic games in Kivy
MIT License
3 stars 1 forks source link

Add tests for each game #21

Closed osso73 closed 3 years ago

osso73 commented 3 years ago

Use pytest (or unittest) to create tests for each of the functions. Not sure how Kivy can be tested, being a graphical environment, but at least individual functions can be tested.

Do that at the same time as documenting the code.

osso73 commented 3 years ago

Unit tests added for game 2048, as per commit f73e705. I had to rename the folder to remove numbers. Can't really do integration tests with kivy environment, so I'll leave it here.

osso73 commented 3 years ago

Tests added to the rest of games: ahorcado (b4a6772), pong (cc9a398), 15puzzle (a624af2) and memory (07fc3c3). I had to rename folder for game 15puzzle, so it can be imported by pytest.