Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 6, 2017

  • bpo-31692: COUNT_ALLOCS now writes into stderr
  • bpo-19527: Fixed tests with defined COUNT_ALLOCS.
  • bpo-31692: Fix more tests for COUNT_ALLOCS

https://bugs.python.org/issue31692

vstinner and others added 3 commits October 6, 2017 21:57
Statistics are now written into stderr, rather than stdout.
* Fix test_abc: Add @requires_type_collecting to test_cache_leak()
* Fix test_hash: get_hash() helper function doesn't redirect stderr
  to stdout anymore, stderr is now redirected to its own pipe which
  is ignored.
* Fix test_regrtest: Skip test_huntrleaks() if COUNT_ALLOCS is defined.
* Fix test_warnings: Skip two tests which rely on stderr.
* Fix test_sys.test_objecttypes(): Fix the object size when
  COUNT_ALLOCS is defined
* Fix test_json, test_tools, test_sys: Don't check stderr if
  COUNT_ALLOCS is defined.
* Fix test_threading: Don't check stderr if COUNT_ALLOCS is defined
* Fix test_subprocess: Skip tests checking stderr.
* Fix test_multiprocessing
@vstinner vstinner changed the title [2.7] COUNT_ALLOCS now writes into stderr, fix also tests for COUNT_ALLOCS [2.7] bpo-31692: COUNT_ALLOCS now writes into stderr, fix also tests for COUNT_ALLOCS Oct 6, 2017

# bpo-31692: If COUNT_ALLOCS is defined, stderr is flooded with allocation
# statistics and so cannot be checked in a reliable way
skip_unless_usable_stderr = test_support.requires_type_collecting
Copy link
Member

Choose a reason for hiding this comment

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

"types are immortal if COUNT_ALLOCS is defined" looks bad skip message for these tests.

@@ -0,0 +1,2 @@
COUNT_ALLOCSi debug mode now writes allocations statistics into stderr,
Copy link
Member

Choose a reason for hiding this comment

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

Typo: COUNT_ALLOCSi

@vstinner
Copy link
Member Author

vstinner commented Oct 9, 2017

I just wrote PR #3927 which is shorter and adds a new PYTHONSHOWALLOCCOUNT environment variable.

@vstinner
Copy link
Member Author

PR #3927 was merged, so I close this one.

@vstinner vstinner closed this Oct 17, 2017
@vstinner vstinner deleted the count_allocs27 branch October 17, 2017 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants