@@ -3,7 +3,6 @@ from contextlib import contextmanager, _GeneratorContextManager
33from xml.sax.saxutils import XMLGenerator
44import _thread
55import atexit
6−import json
76import os
87import ptpython.repl
98import pty
@@ -16,7 +15,7 @@ import sys
1615import tempfile
1716import time
1817import unicodedata
19−from typing import Tuple, TextIO, Any, Callable, Dict, Iterator, Optional, List
18+from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List
2019
2120CHAR_TO_KEY = {
2221 "A": "shift-a",
@@ -771,7 +770,9 @@ def run_tests() -> None:
771770 machine.execute("sync")
772771
773772 if nr_tests != 0:
774− log.log("{} out of {} tests succeeded".format(nr_succeeded, nr_tests))
773+ eprint("{} out of {} tests succeeded".format(nr_succeeded, nr_tests))
774+ if nr_tests > nr_succeeded:
775+ sys.exit(1)
775776
776777
777778@contextmanager