From adb94c3d3e28fe71157ea84c824a8ead43b0b44f Mon Sep 17 00:00:00 2001 From: gfyoung Date: Fri, 6 Jul 2018 12:10:08 -0700 Subject: [PATCH] TST: Add more information for unexpected warnings --- pandas/util/testing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 7574c17308dd5..54ae8cfb3d39e 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -2523,7 +2523,10 @@ class for all warnings. To check that no warning is returned, message=actual_warning.message) assert actual_warning.filename == caller.filename, msg else: - extra_warnings.append(actual_warning.category.__name__) + extra_warnings.append((actual_warning.category.__name__, + actual_warning.message, + actual_warning.filename, + actual_warning.lineno)) if expected_warning: msg = "Did not see expected warning of class {name!r}.".format( name=expected_warning.__name__)