feat: show python syntax-error message if a NameError occurs (#63085)

This commit is contained in:
Oliver Eyton-Williams
2025-10-28 21:20:54 +01:00
committed by GitHub
parent 7652afbe0f
commit 77ea476f12

View File

@@ -222,7 +222,11 @@ export function* executeTests(testRunner, tests, testTimeout = 5000) {
newTest.stack = stack;
}
if (type === 'IndentationError' || type === 'SyntaxError') {
if (
type === 'IndentationError' ||
type === 'SyntaxError' ||
type === 'NameError'
) {
const msgKey =
type === 'IndentationError'
? 'learn.indentation-error'