shift check for pickle placerholder access error in comparator
Some checks failed
end-to-end-test / benchmark-bubble-sort-optimization (pull_request) Failing after 1s
PR Labeler / label-workflow-changes (pull_request) Failing after 1s
Mypy Type Checking for CLI / type-check-cli (pull_request) Failing after 2s
/ Run pr agent on every pull request, respond to user comments (pull_request) Failing after 2s
unit-tests / unit-tests (3.10.13) (pull_request) Failing after 2s
unit-tests / unit-tests (3.11.6) (pull_request) Failing after 1s
unit-tests / unit-tests (3.12.1) (pull_request) Failing after 2s
unit-tests / unit-tests (3.13.0) (pull_request) Failing after 2s
unit-tests / unit-tests (3.9.18) (pull_request) Failing after 1s

This commit is contained in:
Alvin Ryanputra 2025-04-17 16:01:33 -04:00
parent e5ca10fbb6
commit 683c9f64a1

View file

@ -65,11 +65,7 @@ def comparator(orig: Any, new: Any, superset_obj=False) -> bool:
if len(orig) != len(new):
return False
return all(comparator(elem1, elem2, superset_obj) for elem1, elem2 in zip(orig, new))
if isinstance(orig, PicklePlaceholderAccessError) or isinstance(new, PicklePlaceholderAccessError):
# If this error was raised, there was an attempt to access the PicklePlaceholder, which represents an unpickleable object.
# The test results should be rejected as the behavior of the unpickleable object is unknown.
logger.debug("Unable to verify behavior of unpickleable object in replay test")
return False
if isinstance(
orig,
(
@ -95,6 +91,11 @@ def comparator(orig: Any, new: Any, superset_obj=False) -> bool:
return True
return math.isclose(orig, new)
if isinstance(orig, BaseException):
if isinstance(orig, PicklePlaceholderAccessError) or isinstance(new, PicklePlaceholderAccessError):
# If this error was raised, there was an attempt to access the PicklePlaceholder, which represents an unpickleable object.
# The test results should be rejected as the behavior of the unpickleable object is unknown.
logger.debug("Unable to verify behavior of unpickleable object in replay test")
return False
# if str(orig) != str(new):
# return False
# compare the attributes of the two exception objects to determine if they are equivalent.