Address comments
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
Attributes of _WARNING_DETAILS are checked to make sure they can be dumped
|
Warning attributes are checked to make sure they can be dumped prior to
|
||||||
prior to serializing the warning for submission to the master node.
|
serializing the warning for submission to the master node.
|
||||||
|
|||||||
@@ -825,9 +825,8 @@ class TestWarnings:
|
|||||||
# The socket itself will end up attached as a value in
|
# The socket itself will end up attached as a value in
|
||||||
# _WARNING_DETAIL. We need to test that it is not serialized
|
# _WARNING_DETAIL. We need to test that it is not serialized
|
||||||
# (it can't be, so the test will fail if we try to).
|
# (it can't be, so the test will fail if we try to).
|
||||||
|
@pytest.mark.filterwarnings('always')
|
||||||
def test_func(tmpdir):
|
def test_func(tmpdir):
|
||||||
warnings.resetwarnings()
|
|
||||||
warnings.simplefilter('always', ResourceWarning)
|
|
||||||
abuse_socket()
|
abuse_socket()
|
||||||
gc.collect()
|
gc.collect()
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ def serialize_warning_message(warning_message):
|
|||||||
try:
|
try:
|
||||||
dumps(attr)
|
dumps(attr)
|
||||||
except DumpError:
|
except DumpError:
|
||||||
result[attr_name] = None
|
result[attr_name] = repr(attr)
|
||||||
else:
|
else:
|
||||||
result[attr_name] = attr
|
result[attr_name] = attr
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user