Extra logging and more tests

This commit is contained in:
Fahad
2025-06-11 18:26:13 +04:00
parent 3aef6e961b
commit 4974fbc725
10 changed files with 400 additions and 112 deletions

View File

@@ -53,6 +53,9 @@ DATABASE_CONFIG = {
validation_file = os.path.join(self.test_dir, "validation_config.py")
with open(validation_file, "w") as f:
f.write(validation_content)
# Ensure absolute path for MCP server compatibility
validation_file = os.path.abspath(validation_file)
# Test 1: Precommit tool with files parameter (where the bug occurred)
self.logger.info(" 1: Testing precommit tool content duplication")
@@ -110,13 +113,13 @@ DATABASE_CONFIG = {
tools_to_test = [
(
"chat",
{"prompt": "Please use low thinking mode. Analyze this config file", "files": [validation_file]},
{"prompt": "Please use low thinking mode. Analyze this config file", "files": [validation_file]}, # Using absolute path
),
(
"codereview",
{"files": [validation_file], "context": "Please use low thinking mode. Review this configuration"},
{"files": [validation_file], "context": "Please use low thinking mode. Review this configuration"}, # Using absolute path
),
("analyze", {"files": [validation_file], "analysis_type": "code_quality"}),
("analyze", {"files": [validation_file], "analysis_type": "code_quality"}), # Using absolute path
]
for tool_name, params in tools_to_test: