def test_exitVarRebalance(self):
     equation = Equation(1,4.0,{2:-2.0,3:2.0})
     self.assertTrue(equation.exitVarRebalance(2))
     self.assertEquals(equation.basicVar,2)
     self.assertEquals(equation.bValue,2.0)
     self.assertEquals(equation.rhsDict[1],-0.5)
     self.assertEquals(equation.rhsDict[3],1.0)
     self.assertFalse(equation.exitVarRebalance(2))
     
     equation = Equation(4,0.0,{3:0.0,6:-1.0,2:1.0,7:3.0}) 
     equation.exitVarRebalance(6)
     self.assertTrue(Equation.equals(equation,Equation(6,0.0,{3:0.0,4:-1.0,2:1.0,7:3.0})))
 def test_equationEqualsFalse(self):
     self.assertFalse(Equation.equals(Equation(1,4.0,{6:-2.0,3:2.0}),Equation(1,4.0,{2:-2.0,3:2.0})))
     self.assertFalse(Equation.equals(Equation(1,4.0,{2:0.0,3:2.0}),Equation(1,4.0,{2:-2.0,3:2.0})))
 def test_equationEqualsTrue(self):
     self.assertTrue(Equation.equals(Equation(1,4.0,{2:-2.0,3:2.0}),Equation(1,4.0,{2:-2.0,3:2.0})))
     self.assertTrue(Equation.equals(Equation(1,4.0,{3:2.0}),Equation(1,4.0,{3:2.0})))
     self.assertTrue(Equation.equals(Equation(1,4.0,{4:0.0,3:2.0}),Equation(1,4.0,{3:2.0})))