nixos/test-driver: show deprecation warnings in the REPL

Apparently this wasn't the case before, but now it is

    In [3]: machine.shell_interact()
    ??? Warning (DeprecationWarning): Use the SSH backdoor instead
        File "<ipython-input-3-4e72ea6a987e>", line 1
This commit is contained in:
Maximilian Bosch
2026-06-26 12:27:42 +02:00
parent b9706678ac
commit 59249b1624
@@ -6,6 +6,7 @@ import warnings
from pathlib import Path
import ptpython.ipython
import ptpython.repl
from colorama import Fore, Style
from test_driver.debug import Debug, DebugAbstract, DebugNop
@@ -174,6 +175,7 @@ def main() -> None:
if args.interactive:
history_dir = os.getcwd()
history_path = os.path.join(history_dir, ".nixos-test-history")
ptpython.repl.enable_deprecation_warnings()
ptpython.ipython.embed(
user_ns=driver.test_symbols(),
history_filename=history_path,