pluggy icon indicating copy to clipboard operation
pluggy copied to clipboard

[WIP] Issue 424/add saferepr

Open anusha-shekhar opened this issue 2 years ago • 1 comments

Description

An error was thrown after enabling tracing if one of the local objects lacked a specific outdated Scikit-Learn object. The issue asked to include error handling when outputting tracing messages for invalid string representations in order to increase the robustness of Pluggy’s error handling mechanism.

Solution

The saferepr module was implemented and adapted to Pluggy, as done in the Pytest repo. Saferepr includes a generous try...except clause along with additional error handling. This ensures that errors do not bubble up.

Steps to test

  • Provide an invalid repr object
  • It should safely handle such a string representation

Link to issue

https://github.com/pytest-dev/pluggy/issues/424

anusha-shekhar avatar Dec 13 '23 04:12 anusha-shekhar

Hi! It seems that some of the code coverage pipeline is inaccurate. It is counting empty lines as requiring test coverage (please see screenshot provided)

Screenshot 2023-12-13 at 11 36 23 PM

anusha-shekhar avatar Dec 14 '23 04:12 anusha-shekhar