nixos/test: use ptpython as repl

This commit is contained in:
Florian Klink 2019-11-04 22:49:45 +01:00 committed by Jacek Galowicz
parent 3a28fefe7d
commit ac97edf013
2 changed files with 3 additions and 7 deletions

View File

@ -15,6 +15,7 @@ import sys
import tempfile import tempfile
import time import time
import unicodedata import unicodedata
import ptpython.repl
CHAR_TO_KEY = { CHAR_TO_KEY = {
"A": "shift-a", "A": "shift-a",
@ -690,12 +691,7 @@ def run_tests():
eprint("error: {}".format(str(e))) eprint("error: {}".format(str(e)))
sys.exit(1) sys.exit(1)
else: else:
while True: ptpython.repl.embed(locals(), globals())
try:
value = input("> ")
exec(value)
except EOFError:
break
# TODO: Collect coverage data # TODO: Collect coverage data

View File

@ -25,7 +25,7 @@ in rec {
name = "nixos-test-driver"; name = "nixos-test-driver";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ]; buildInputs = [ (python3.withPackages (p: [ p.ptpython ])) ];
checkInputs = with python3Packages; [ pylint black ]; checkInputs = with python3Packages; [ pylint black ];
dontUnpack = true; dontUnpack = true;