Skip to content

bpo-46430: Add test for checking block leak is zero - #31556

Closed
corona10 wants to merge 1 commit into
python:mainfrom
corona10:bpo-46430-check
Closed

bpo-46430: Add test for checking block leak is zero#31556
corona10 wants to merge 1 commit into
python:mainfrom
corona10:bpo-46430-check

Conversation

@corona10

@corona10corona10 commented Feb 24, 2022

Copy link
Copy Markdown
Member

# 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
Copy Markdown
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.

@corona10corona10Feb 24, 2022

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
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