コード例 #1
0
 def test_smallerGrid(self):
     number = 5
     result = defaultGridspecGrid(number)
     self.assertEquals(result, [2, 3])
コード例 #2
0
 def test_specialCaseThree(self):
     number = 3
     result = defaultGridspecGrid(number)
     self.assertEquals(result, [3, 1])
コード例 #3
0
 def test_specialCaseTwo(self):
     number = 2
     result = defaultGridspecGrid(number)
     self.assertEquals(result, [1, 2])
コード例 #4
0
 def test_specialCaseOne(self):
     number = 1
     result = defaultGridspecGrid(number)
     self.assertEquals(result, [1, 1])
コード例 #5
0
 def test_notSquares(self):
     roots = [3, 4, 5, 123]
     for root in roots:
         result = defaultGridspecGrid(root * root - 1)
         self.assertEquals(result, [root, root])
コード例 #6
0
 def test_someSquares(self):
     roots = [2, 3, 4, 5, 123]
     for root in roots:
         result = defaultGridspecGrid(root * root)
         self.assertEqual(result, [root, root])