예제 #1
0
    def test_var_copy(self):
        """Test the copy function for variable types.
        """
        x = Variable(3, 4, name="x")
        y = x.copy()
        self.assertEquals(y.size, (3, 4))
        self.assertEquals(y.name(), "x")

        x = Semidef(5, name="x")
        y = x.copy()
        self.assertEquals(y.size, (5, 5))
예제 #2
0
    def test_var_copy(self):
        """Test the copy function for variable types.
        """
        x = Variable(3, 4, name="x")
        y = x.copy()
        self.assertEqual(y.size, (3, 4))
        self.assertEqual(y.name(), "x")

        x = Semidef(5, name="x")
        y = x.copy()
        self.assertEqual(y.size, (5, 5))