Improve writing test prompt

This commit is contained in:
kagami 2024-05-23 17:21:49 +08:00
parent b0fe0b4be7
commit 1a303b4b0c
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,6 @@ import openai
sys.path.append(os.path.dirname(__file__))
from cache import LocalCache
from i18n import TUILanguage, get_translation
from model import (
FuncToTest,
@ -16,6 +15,7 @@ from model import (
)
from ut_workflow import UnitTestsWorkflow
from cache import LocalCache
from lib.chatmark import Step
from lib.ide_service import IDEService

View File

@ -76,6 +76,7 @@ Basic requirements
5. If two or more test cases share the same setup, you should reuse the setup code.
6. If two or more test cases share the same test logic, you should reuse the test logic.
7. Use TODO comments or FIXME comments to indicate any missing parts of the code or any parts that need to be improved.
8. Write as much production-ready code as possible, leaving less TODO comments or FIXME comments.
{additional_requirements}

View File

@ -1,6 +1,5 @@
from typing import Dict, List, Tuple
from cache import LocalCache
from find_context import (
Context,
Position,
@ -18,6 +17,7 @@ from propose_test import propose_test
from tools.file_util import retrieve_file_content
from write_tests import write_and_print_tests
from cache import LocalCache
from lib.chatmark import Checkbox, Form, Step, TextEditor