Skip to content

Commit 9ad8aa7

Browse files
gfyoungjreback
authored andcommitted
TST: Add more information for unexpected warnings (#21779)
1 parent 3344918 commit 9ad8aa7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/util/testing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,10 @@ class for all warnings. To check that no warning is returned,
25232523
message=actual_warning.message)
25242524
assert actual_warning.filename == caller.filename, msg
25252525
else:
2526-
extra_warnings.append(actual_warning.category.__name__)
2526+
extra_warnings.append((actual_warning.category.__name__,
2527+
actual_warning.message,
2528+
actual_warning.filename,
2529+
actual_warning.lineno))
25272530
if expected_warning:
25282531
msg = "Did not see expected warning of class {name!r}.".format(
25292532
name=expected_warning.__name__)

0 commit comments

Comments
 (0)