Skip to content

In Errors and Exceptions there is a bug in the script... #138009

@Fosters4him

Description

@Fosters4him

Documentation

The following code snippet on Exceptions does not run, it errors on "tests" not defined.

Suggest adding line: tests = ['testrun1.exe', 'testrun2.exe'] before "for" loop, then the intended exception is raised.

excs = []
for test in tests:
    try:
        test.run()
    except Exception as e:
        excs.append(e)

if excs:
   raise ExceptionGroup("Test Failures", excs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is provided

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions