nixos/test: use ptpython as repl
This commit is contained in:
parent
3a28fefe7d
commit
ac97edf013
nixos/lib
@ -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
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user