Added the boardgame tic-tac-toe without winning conditions, written entirely in Python.
This commit is contained in:
parent
0590fa6ca1
commit
affcb739b4
28 changed files with 448 additions and 0 deletions
23
games/tic-tac-toe/test_gamerectangle.py
Normal file
23
games/tic-tac-toe/test_gamerectangle.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import unittest
|
||||
from gamerectangle import GameRectangle
|
||||
|
||||
|
||||
|
||||
class TestGameRectangle(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.index = 0
|
||||
self.x = 1
|
||||
self.y = 2
|
||||
self.width = 34
|
||||
self.height = 0.23
|
||||
self.gr = GameRectangle(self.index, self.x, self.y, self.width, self.height)
|
||||
def test_attributes(self):
|
||||
self.assertEqual(self.index, self.gr.index)
|
||||
self.assertEqual(self.gr.state, ' ')
|
||||
self.assertEqual(self.x, self.gr.x)
|
||||
self.assertEqual(self.y, self.gr.y)
|
||||
self.assertEqual(self.width, self.gr.width)
|
||||
self.assertEqual(self.height, self.gr.height)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in a new issue