summary refs log tree commit diff
path: root/nixos/lib/test-driver/test-driver.py
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-11-04 22:49:45 +0100
committerJacek Galowicz <jacek.galowicz@cyberus-technology.de>2019-11-04 23:50:27 +0100
commitac97edf013368c10c0c0978780d89b60bc520900 (patch)
treefdf7e8f745b7464e0b1f7573d4e317ed3a4d759a /nixos/lib/test-driver/test-driver.py
parent3a28fefe7d4e7d842304ff4eee42c76593194b0a (diff)
downloadnixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar.gz
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar.bz2
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar.lz
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar.xz
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.tar.zst
nixpkgs-ac97edf013368c10c0c0978780d89b60bc520900.zip
nixos/test: use ptpython as repl
Diffstat (limited to 'nixos/lib/test-driver/test-driver.py')
-rw-r--r--nixos/lib/test-driver/test-driver.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index 16d4b0b907d..45b7e229a5c 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -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