diff --git a/changelog/379.bugfix.rst b/changelog/379.bugfix.rst index f77ad12..d569ce1 100644 --- a/changelog/379.bugfix.rst +++ b/changelog/379.bugfix.rst @@ -1,2 +1,2 @@ -Attributes of _WARNING_DETAILS are checked to make sure they can be dumped -prior to serializing the warning for submission to the master node. +Warning attributes are checked to make sure they can be dumped prior to +serializing the warning for submission to the master node. diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 84c3bbe..f462ecd 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -825,9 +825,8 @@ class TestWarnings: # The socket itself will end up attached as a value in # _WARNING_DETAIL. We need to test that it is not serialized # (it can't be, so the test will fail if we try to). + @pytest.mark.filterwarnings('always') def test_func(tmpdir): - warnings.resetwarnings() - warnings.simplefilter('always', ResourceWarning) abuse_socket() gc.collect() """ diff --git a/xdist/remote.py b/xdist/remote.py index 1faf3b2..2e97675 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -224,7 +224,7 @@ def serialize_warning_message(warning_message): try: dumps(attr) except DumpError: - result[attr_name] = None + result[attr_name] = repr(attr) else: result[attr_name] = attr return result