Skip to content

Commit 9201745

Browse files
committed
Attempt to fix tests.
1 parent 8ea6619 commit 9201745

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyfolio/tests/test_risk.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ def test_compute_sector_exposures(self, positions, sectors,
112112
expected_shorted.columns = expected_shorted.columns.astype(int)
113113
expected_grossed.columns = expected_grossed.columns.astype(int)
114114

115-
assert_frame_equal(pd.concat(sector_exposures[0], axis=1),
116-
expected_longed, check_exact=False)
117-
assert_frame_equal(pd.concat(sector_exposures[1], axis=1),
118-
expected_shorted, check_exact=False)
119-
assert_frame_equal(pd.concat(sector_exposures[2], axis=1),
120-
expected_grossed, check_exact=False)
115+
assert_frame_equal(pd.concat(sector_exposures[0], axis=1).fillna(0.),
116+
expected_longed)
117+
assert_frame_equal(pd.concat(sector_exposures[1], axis=1).fillna(0.),
118+
expected_shorted)
119+
assert_frame_equal(pd.concat(sector_exposures[2], axis=1).fillna(0.),
120+
expected_grossed)
121121

122122
@parameterized.expand([
123123
(test_pos, test_caps, expected_caps_longed, expected_caps_shorted,

0 commit comments

Comments
 (0)