Skip to content

Conversation

@corona10
Copy link
Member

@corona10corona10 commented Feb 24, 2022

# 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
MemberAuthor

@corona10corona10Feb 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
MemberAuthor

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@corona10@kumaraditya303@the-knights-who-say-ni@bedevere-bot