From 30fa136244194281ad1bc3b19c2abc984197e3ff Mon Sep 17 00:00:00 2001 From: Jeff Tratner Date: Sun, 27 Oct 2013 23:28:28 -0400 Subject: [PATCH] TST/CLN: Only print on test failure. Don't pollute test output. --- pandas/stats/tests/test_moments.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandas/stats/tests/test_moments.py b/pandas/stats/tests/test_moments.py index 1f7df9894a97d..46f4355a5a1f3 100644 --- a/pandas/stats/tests/test_moments.py +++ b/pandas/stats/tests/test_moments.py @@ -635,8 +635,11 @@ def test_corr_sanity(self): for i in range(10): df = DataFrame(np.random.rand(30,2)) res = mom.rolling_corr(df[0],df[1],5,center=True) - print( res) - self.assertTrue(all([np.abs(np.nan_to_num(x)) <=1 for x in res])) + try: + self.assertTrue(all([np.abs(np.nan_to_num(x)) <=1 for x in res])) + except: + print(res) + def test_flex_binary_frame(self): def _check(method):