Skip to content

Commit 324492f

Browse files
committed
Trying to pass the test on GitHub...
1 parent 5166de0 commit 324492f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/riskparityportfolio/tests/test_modern_rpp.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ def test_constraints():
110110
my_portfolio.design(Cmat=np.empty((0, N)), cvec=[],
111111
Dmat=np.vstack([-np.ones((1,N)), np.ones((1,N))]), dvec=np.array([-0.5, 1]))
112112
w = my_portfolio.weights
113-
np.testing.assert_array_less(sum(w), 1.0)
114-
np.testing.assert_array_less(-sum(w), -0.5)
113+
np.testing.assert_equal(sum(w) <= 1.0 + 1e-5, True)
114+
np.testing.assert_equal(sum(w) >= 0.5 - 1e-5, True)
115+
116+
#np.testing.assert_array_less(sum(w), 1.0)
117+
#np.testing.assert_array_less(-sum(w), -0.5)
115118

116119

117120
def test_dummy_variables():

0 commit comments

Comments
 (0)