errore test segreti homework 2

D
Davide Vittucci (560 points)
2 4 6
asked Nov 19, 2021 in HW2 by Davide Vittucci (560 points)
Nella sezione correttezza mi da quest'errore, da cosa è dovuto?

args = ('py._io.terminalwriter', None, None, ['__doc__']), kargs = {}
name = 'py._io.terminalwriter', rest = [None, None, ['__doc__']]

    def _check_import(*args, **kargs)=
        name, *rest = args
        if name in forbidden or (not forbidden and name not in allowed)=
            print(f"Importing {name} (globals, locals, {rest[-2=]}) (not allowed)")
>           raise ForbiddenError(f"The import of '{name}' is forbidden")
E           testlib.ForbiddenError= The import of 'py._io.terminalwriter' is forbidden

testlib.py=44= ForbiddenError

1 Answer

leonardo.manuguerra (970 points)
0 0 3
answered Nov 19, 2021 by leonardo.manuguerra (970 points)

L'errore "Forbidden Import io.terminalwriter" è dovuto a pytest che vuole stampare un errore colorato di rosso.

(fonte)

D
Davide Vittucci (560 points)
2 4 6
commented Nov 19, 2021 by Davide Vittucci (560 points)
edited Nov 19, 2021 by Davide Vittucci
Ho visto grazie mille