Added the boardgame tic-tac-toe without winning conditions, written entirely in Python.

This commit is contained in:
Kallfaktorn 2011-01-28 01:21:12 +01:00
parent 0590fa6ca1
commit affcb739b4
28 changed files with 448 additions and 0 deletions

View file

@ -0,0 +1,27 @@
import unittest
from rectangle import Rectangle
def main():
x = 1
y = 2
width = 34
height = 0.23
r = Rectangle(x, y, width, height)
class TestRectangle(unittest.TestCase):
def setUp(self):
self.x = 1
self.y = 2
self.width = 34
self.height = 0.23
self.r = Rectangle(self.x, self.y, self.width, self.height)
def test_attributes(self):
self.assertEqual(self.x, self.r.x)
self.assertEqual(self.y, self.r.y)
self.assertEqual(self.r.width, self.r.width)
self.assertEqual(self.r.height, self.r.height)
if __name__ == '__main__':
unittest.main()