Assure user that loud errors generated by macOS libc's malloc are expected.
(test_name)
| 770 | |
| 771 | |
| 772 | def 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 | |
| 791 | def findfile(filename, subdir=None): |
no test coverage detected
searching dependent graphs…