Skip to content

Commit d8866a5

Browse files
hezyinkagami-l
authored andcommitted
misc: formatting
1 parent cd43eb3 commit d8866a5

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

unit_tests/main.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
import click
66
from find_reference_tests import find_reference_tests
77
from i18n import TUILanguage, get_translation
8-
from model import FuncToTest, TokenBudgetExceededException, UserCancelledException
8+
from model import (
9+
FuncToTest,
10+
TokenBudgetExceededException,
11+
UserCancelledException,
12+
)
913
from propose_test import propose_test
1014
from tools.file_util import retrieve_file_content
1115
from write_tests import write_and_print_tests
@@ -39,7 +43,9 @@ def run(self):
3943

4044
self.step3_write_and_print_tests(cases, files)
4145

42-
def step1_propose_cases_and_reference_files(self) -> Tuple[List[str], List[str]]:
46+
def step1_propose_cases_and_reference_files(
47+
self,
48+
) -> Tuple[List[str], List[str]]:
4349
"""
4450
Propose test cases and reference files for a specified function.
4551
@@ -60,7 +66,9 @@ def step1_propose_cases_and_reference_files(self) -> Tuple[List[str], List[str]]
6066
)
6167

6268
ref_files = find_reference_tests(
63-
self.repo_root, self.func_to_test.func_name, self.func_to_test.file_path
69+
self.repo_root,
70+
self.func_to_test.func_name,
71+
self.func_to_test.file_path,
6472
)
6573

6674
if ref_files:
@@ -122,7 +130,7 @@ def step2_edit_cases_and_reference_files(
122130
try:
123131
retrieve_file_content(file_path=ref_file, root_path=self.repo_root)
124132
valid_files.append(ref_file)
125-
except Exception as e:
133+
except Exception:
126134
invalid_files.append(ref_file)
127135

128136
# Print summary

unit_tests/prompts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"""
4242

4343

44-
4544
FIND_REFERENCE_PROMPT = """
4645
Identify a suitable reference test file that can be used as a guide for writing test cases
4746
for the function {function_name}, located in the file {file_path}.

0 commit comments

Comments
 (0)