Skip to content

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Feb 24, 2022

@@ -125,6 +126,9 @@ def run_python(*args):
# because of bugs in C extensions. This test is only about checking
# the showrefcount feature.
self.assertRegex(err, br'^\[-?\d+ refs, \d+ blocks\]')
refs, blocks = map(int, re.findall(r'-?\d+', str(err)))
self.assertLessEqual(refs, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refs should be 0 not negative.

Copy link
Member Author

@corona10 corona10 Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumaraditya303 Please read the comment why I check the negotive value


            # bpo-46417: Tolerate negative reference count which can occur
            # because of bugs in C extensions. This test is only about checking
            # the showrefcount feature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I am closing this PR since the #31555 looks better approach.

@corona10 corona10 closed this Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants