From 84c767122ff360c576a079e08deb15b69a474e0e Mon Sep 17 00:00:00 2001 From: Juan Altmayer Pizzorno Date: Mon, 25 Mar 2024 12:58:55 -0400 Subject: [PATCH] - added --prefix to specify the prefix for test file names; --- src/coverup/coverup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/coverup/coverup.py b/src/coverup/coverup.py index 54b4769..e39eee4 100644 --- a/src/coverup/coverup.py +++ b/src/coverup/coverup.py @@ -16,8 +16,6 @@ from .testrunner import * -PREFIX = 'coverup' - # Turn off most logging litellm.set_verbose = False logging.getLogger().setLevel(logging.ERROR) @@ -74,7 +72,7 @@ def Path_dir(value): action=argparse.BooleanOptionalAction, help=f'show details of lines/branches after each response') - ap.add_argument('--log-file', default=f"{PREFIX}-log", + ap.add_argument('--log-file', default=f"coverup-log", help='log file to use') ap.add_argument('--pytest-args', type=str, default='', @@ -84,6 +82,9 @@ def Path_dir(value): action=argparse.BooleanOptionalAction, help='attempt to install any missing modules') + ap.add_argument('--prefix', type=str, default='coverup', + help='prefix to use for test file names') + ap.add_argument('--write-requirements-to', type=Path, help='append the name of any missing modules to the given file') @@ -112,7 +113,7 @@ def positive_int(value): def test_file_path(test_seq: int) -> Path: """Returns the Path for a test's file, given its sequence number.""" global args - return args.tests_dir / f"test_{PREFIX}_{args.model.split('/')[0]}_{test_seq}.py" + return args.tests_dir / f"test_{args.prefix}_{test_seq}.py" test_seq = 1