File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
- Attributes of _WARNING_DETAILS are checked to make sure they can be dumped
2
- prior to serializing the warning for submission to the master node.
1
+ Warning attributes are checked to make sure they can be dumped prior to
2
+ serializing the warning for submission to the master node.
Original file line number Diff line number Diff line change @@ -825,9 +825,8 @@ def abuse_socket():
825
825
# The socket itself will end up attached as a value in
826
826
# _WARNING_DETAIL. We need to test that it is not serialized
827
827
# (it can't be, so the test will fail if we try to).
828
+ @pytest.mark.filterwarnings('always')
828
829
def test_func(tmpdir):
829
- warnings.resetwarnings()
830
- warnings.simplefilter('always', ResourceWarning)
831
830
abuse_socket()
832
831
gc.collect()
833
832
"""
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ def serialize_warning_message(warning_message):
224
224
try :
225
225
dumps (attr )
226
226
except DumpError :
227
- result [attr_name ] = None
227
+ result [attr_name ] = repr ( attr )
228
228
else :
229
229
result [attr_name ] = attr
230
230
return result
You can’t perform that action at this time.
0 commit comments