From 3b7579990bbf23dee976bc987c52ec7f147bc738 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 10 Apr 2023 22:21:49 -0400 Subject: [PATCH] Link `tractor` debug mode to `pytest` --pdb flag --- tests/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 897c6b7f..87611c55 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -87,8 +87,11 @@ def log( @acm async def _open_test_pikerd( tmpconfdir: str, + reg_addr: tuple[str, int] | None = None, loglevel: str = 'warning', + debug_mode: bool = False, + **kwargs, ) -> tuple[ @@ -122,7 +125,7 @@ async def _open_test_pikerd( # or just in sequence per test, so we keep root. drop_root_perms_for_ahab=False, - debug_mode=True, + debug_mode=debug_mode, **kwargs, @@ -178,6 +181,8 @@ def open_test_pikerd( # bind in level from fixture, which is itself set by # `--ll ` cli flag. loglevel=loglevel, + + debug_mode=request.config.option.usepdb ) # NOTE: the `tmp_dir` fixture will wipe any files older then 3 test