llnl.util.lang: remove testing literal backtrace output (#48209)

This commit is contained in:
Harmen Stoppels 2024-12-19 11:55:41 +01:00 committed by GitHub
parent 8d8e36d7e2
commit 96a0b0eb08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,30 +298,6 @@ def inner():
top-level raised TypeError: ok""" top-level raised TypeError: ok"""
) )
full_message = h.grouped_message(with_tracebacks=True)
no_line_numbers = re.sub(r"line [0-9]+,", "line xxx,", full_message)
assert (
no_line_numbers
== dedent(
"""\
due to the following failures:
inner method raised ValueError: wow!
File "{0}", \
line xxx, in test_grouped_exception
inner()
File "{0}", \
line xxx, in inner
raise ValueError("wow!")
top-level raised TypeError: ok
File "{0}", \
line xxx, in test_grouped_exception
raise TypeError("ok")
"""
).format(__file__)
)
def test_grouped_exception_base_type(): def test_grouped_exception_base_type():
h = llnl.util.lang.GroupedExceptionHandler() h = llnl.util.lang.GroupedExceptionHandler()