Ejemplo n.º 1
0
    def test_clone(self):
        v = Variable('v', 10)
        expr = Expression(v, 20, 2)
        clone = expr.clone()

        self.assertEqual(clone.constant, expr.constant)
        self.assertEqual(len(clone.terms), len(expr.terms))
        self.assertEqual(clone.terms.get(v), 20)
Ejemplo n.º 2
0
    def test_clone(self):
        v = Variable('v', 10)
        expr = Expression(v, 20, 2)
        clone = expr.clone()

        self.assertEqual(clone.constant, expr.constant)
        self.assertEqual(len(clone.terms), len(expr.terms))
        self.assertEqual(clone.terms.get(v), 20)