'Test the PSD constraint <<.'

def test_nsd_constraint(self):

    constr = (self.A << self.B)
    self.assertEqual(constr.name(), 'B    >>    A')
    self.assertEqual(constr.size, (2, 2))
    assert (constr.dual_value is None)
    assert (constr.value is None)
    self.B.save_value(np.matrix('2    -1;    1    2'))
    self.A.save_value(np.matrix('1    0;    0    1'))
    assert constr.value
    self.A.save_value(np.matrix('3    0;    0    3'))
    assert (not constr.value)
    with self.assertRaises(Exception) as cm:
        (self.x << self.y)
    self.assertEqual(str(cm.exception), 'Non-square    matrix    in    positive    definite    constraint.')
