示例#1
0
    def test_zero( self ):
        rect = rectangle.create_zeros()

        self.assertEqual(
            rect[ (0,0) ],
            0,
            "Rectangle is not zero'ed"
            )
        self.assertEqual(
            rect[ (0,1) ],
            0,
            "Rectangle is not zero'ed"
            )
        self.assertEqual(
            rect[ (1,0) ],
            0,
            "Rectangle is not zero'ed"
            )
        self.assertEqual(
            rect[ (1,1) ],
            0,
            "Rectangle is not zero'ed"
            )
示例#2
0
 def test_create_zeros(self):
     result = rectangle.create_zeros()
     np.testing.assert_almost_equal(result, [[0,0],[0,0]], decimal=5)
示例#3
0
 def test_create_zeros(self):
     result = rectangle.create_zeros()
     np.testing.assert_almost_equal(result, [[0,0],[0,0]], decimal=5)