From de2d50d20186e51d29d45e2208f1fd714fad3125 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sat, 27 Dec 2025 22:03:55 -0500 Subject: [PATCH] Make isolated mode the default --- pyfrc/mains/cli_test.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pyfrc/mains/cli_test.py b/pyfrc/mains/cli_test.py index daf20ea..040f6c9 100644 --- a/pyfrc/mains/cli_test.py +++ b/pyfrc/mains/cli_test.py @@ -43,11 +43,19 @@ def __init__(self, parser=None): action="store_true", help="Use pyfrc's builtin tests if no tests are specified", ) - parser.add_argument( + isolation_group = parser.add_mutually_exclusive_group() + isolation_group.add_argument( "--isolated", default=None, + dest="isolated", action="store_true", - help="Run each test in a separate robot process. Set `tool.robotpy.pyfrc.isolated` to true in your pyproject.toml to enable by default", + help="Run each test in a separate robot process (default). Set `tool.robotpy.pyfrc.isolated` in your pyproject.toml to control the default", + ) + isolation_group.add_argument( + "--no-isolation", + dest="isolated", + action="store_false", + help="Disable isolated test mode and run tests in-process", ) parser.add_argument( "--coverage-mode", @@ -99,13 +107,7 @@ def run( isolated = v if isolated is None: - isolated = False - - if not isolated: - logger.info( - "Isolated test mode not enabled, consider using it if your tests hang" - ) - logger.info("- See 'robotpy test --help' for details") + isolated = True try: return self._run_test(