From e62c87e812ca47571e717974ea61a0e2d404b7d7 Mon Sep 17 00:00:00 2001 From: ComboProblem <102884863+ComboProblem@users.noreply.github.com> Date: Wed, 8 May 2024 14:45:40 -0700 Subject: [PATCH] added tests for copy method and verified correct functionality --- src/sage/numerical/interactive_simplex_method.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 2beaae0fe2c..4b227304ad8 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -3913,6 +3913,22 @@ def __init__(self, A, b, c, objective_value, self._AbcvBNz = [A, b, c, objective_value, B, N, SR(objective_name)] def __copy__(self): + r""" + TESTS:: + sage: A = ([1, 1], [3, 1]) + sage: b = (1000, 1500) + sage: c = (10, 5) + sage: P = InteractiveLPProblemStandardForm(A, b, c) + sage: D = P.initial_dictionary() + sage: D_2 = copy(D) + sage: D is D_2 + False + sage: D.enter('x1') + sage: D.leave('x3') + sage: D.update() + sage: D_2 == D + False + """ return type(self)(*self._AbcvBNz) @staticmethod