Skip to content

Commit

Permalink
print debug
Browse files Browse the repository at this point in the history
  • Loading branch information
88d52bdba0366127fffca9dfa93895 committed Dec 4, 2023
1 parent fb48396 commit ea7e16c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions tests/test_efficient_frontier.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,12 @@ def test_efficient_risk_market_neutral_warning():
ef = setup_efficient_frontier()
with pytest.warns(RuntimeWarning) as w:
ef.efficient_risk(0.19, market_neutral=True)
print("test_efficient_risk_market_neutral_warning", len(w), type(w), str(w))
print(
"test_efficient_risk_market_neutral_warning",
len(w),
type(w),
[v.message for v in w],
)
assert len(w) == 1
assert (
str(w[0].message)
Expand Down Expand Up @@ -1187,7 +1192,12 @@ def test_efficient_return_market_neutral_warning():
ef = setup_efficient_frontier()
with pytest.warns(RuntimeWarning) as w:
ef.efficient_return(0.25, market_neutral=True)
print("test_efficient_return_market_neutral_warning", len(w), type(w), str(w))
print(
"test_efficient_return_market_neutral_warning",
len(w),
type(w),
[v.message for v in w],
)
assert len(w) == 1
assert (
str(w[0].message)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_dendrogram_plot():
hrp = HRPOpt(returns)
with pytest.warns(RuntimeWarning) as w:
ax = plotting.plot_dendrogram(hrp, show_tickers=False, showfig=False)
print("test_dendrogram_plot", len(w), type(w), str(w))
print("test_dendrogram_plot", len(w), type(w), [v.message for v in w])
assert len(w) == 1
assert (
str(w[0].message)
Expand Down

0 comments on commit ea7e16c

Please sign in to comment.