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

View file

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