Skip to content

Commit 0502f16

Browse files
gfyoungvictor
authored and
victor
committed
TST: Add more information for unexpected warnings (pandas-dev#21779)
1 parent 6bcae88 commit 0502f16

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/util/testing.py

+4-1
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)