docs: update test format documentation in README

Update documentation to reflect new TXT format with separator for summarization tests instead of JSON format. Clarify that expected field may be empty if summary generation fails.

feat: change test generation to TXT format with separator

Change test generation from JSON to TXT format with TEST_SEPARATOR. Add filename sanitization function to handle MongoDB record IDs. Update output path and file naming logic. Add attempt to generate expected summary through LLM with fallback to empty string.
This commit is contained in:
2026-01-22 20:40:41 +03:00
parent 2466f1253a
commit 2a04e6c089
21 changed files with 96 additions and 104 deletions

View File

@@ -1,7 +1,6 @@
Write a Python function that calculates the factorial of a number using recursion.
Write a Python function that calculates the factorial of a number.
==============
def factorial(n):
if n == 0 or n == 1:
if n == 0:
return 1
else:
return n * factorial(n-1)
return n * factorial(n - 1)

View File

@@ -1,4 +1,4 @@
Write a Python function that reverses a string.
==============
def reverse_string(s):
return s[::-1]
return s[::-1]

View File

@@ -1,44 +1,9 @@
Here's a simple Python programming task:
**Task:** Write a Python function that checks if a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization).
**Function Signature:**
```python
def is_palindrome(s: str) -> bool:
"""
Check if the given string `s` is a palindrome.
Args:
s (str): The input string to check.
Returns:
bool: True if `s` is a palindrome, False otherwise.
"""
```
**Example:**
```python
assert is_palindrome("racecar") == True
assert is_palindrome("hello") == False
assert is_palindrome("A man, a plan, a canal: Panama") == True # Ignoring spaces and punctuation
```
**Hint:** You can use the `str.lower()` method to convert the string to lowercase and the `re` module to remove non-alphanumeric characters.
Write a Python function that checks if a number is prime.
==============
```python
import re
def is_palindrome(s: str) -> bool:
"""
Check if the given string `s` is a palindrome.
Args:
s (str): The input string to check.
Returns:
bool: True if `s` is a palindrome, False otherwise.
"""
cleaned = re.sub(r'\W+', '', s.lower())
return cleaned == cleaned[::-1]
```
def is_prime(n):
if n <= 1:
return False
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
return False
return True