Skip to content

Commit da89834

Browse files
committed
Merge pull request #5360 from jtratner/only-print-conditionally-in-tests
TST/CLN: Only print on test failures.
2 parents d0342aa + 30fa136 commit da89834

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/stats/tests/test_moments.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,11 @@ def test_corr_sanity(self):
635635
for i in range(10):
636636
df = DataFrame(np.random.rand(30,2))
637637
res = mom.rolling_corr(df[0],df[1],5,center=True)
638-
print( res)
639-
self.assertTrue(all([np.abs(np.nan_to_num(x)) <=1 for x in res]))
638+
try:
639+
self.assertTrue(all([np.abs(np.nan_to_num(x)) <=1 for x in res]))
640+
except:
641+
print(res)
642+
640643

641644
def test_flex_binary_frame(self):
642645
def _check(method):

0 commit comments

Comments
 (0)