MCPcopy Index your code
hub / github.com/python/cpython / darwin_malloc_err_warning

Function darwin_malloc_err_warning

Lib/test/support/__init__.py:772–788  ·  view source on GitHub ↗

Assure user that loud errors generated by macOS libc's malloc are expected.

(test_name)

Source from the content-addressed store, hash-verified

770
771
772def darwin_malloc_err_warning(test_name):
773 """Assure user that loud errors generated by macOS libc's malloc are
774 expected."""
775 if sys.platform != 'darwin':
776 return
777
778 import shutil
779 msg = ' NOTICE '
780 detail = (f'{test_name} may generate "malloc can\'t allocate region"\n'
781 'warnings on macOS systems. This behavior is known. Do not\n'
782 'report a bug unless tests are also failing.\n'
783 'See https://github.com/python/cpython/issues/85100')
784
785 padding, _ = shutil.get_terminal_size()
786 print(msg.center(padding, '-'))
787 print(detail)
788 print('-' * padding)
789
790
791def findfile(filename, subdir=None):

Callers 1

test_decimal.pyFile · 0.90

Calls 1

centerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…