comparison tests/filtertraceback.py @ 49869:fe044ce4bb17 stable

tests: filter out PEP 657 error locations in tracebacks (issue6780) https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 09 Jan 2023 18:00:07 +0400
parents 6000f5b25c9b
children 8431296a93e8
comparison
equal deleted inserted replaced
49844:d5ca12dbfcde 49869:fe044ce4bb17
29 continue 29 continue
30 30
31 elif not line.startswith(' '): 31 elif not line.startswith(' '):
32 state = 'none' 32 state = 'none'
33 33
34 elif not line.replace('^', '').replace('~', '').strip():
35 # PEP 657: Fine-grained error locations in tracebacks
36 # ~~~~~~^^^^^^^^^
37 continue
38
34 elif state == 'file': 39 elif state == 'file':
35 # Ignore lines after " File " 40 # Ignore lines after " File "
36 state = 'tb' 41 state = 'tb'
37 continue 42 continue
38 43