Skip to content

Commit 1fbab67

Browse files
committed
step7
1 parent 4006d49 commit 1fbab67

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gendiff/tests/diff_generator_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ def test_generate_diff(file1, file2, expected_file):
2020

2121
# Улучшенная нормализация пробелов
2222
def normalize_text(text):
23-
text = re.sub(r'\s*:\s*', ': ', text) # Гарантируем ровный пробел перед двоеточием
24-
text = re.sub(r'\s*{\s*', ' { ', text) # Гарантируем пробел перед `{`
23+
text = re.sub(r'\s*:\s*', ': ', text) # Ровный пробел перед двоеточием
24+
text = re.sub(r'\s*{\s*', ' { ', text) # Ровный пробел перед `{`
2525
text = re.sub(r'\s+', ' ', text).strip() # Убираем лишние пробелы
2626
return text
2727

2828
actual_result = normalize_text(actual_result)
2929
expected_result = normalize_text(expected_result)
3030

3131
assert actual_result == expected_result, (
32-
f"\nExpected:\n{expected_result}\n\nGot:\n{actual_result}"
32+
f"\nExpected:\n{expected_result}\n\n"
33+
f"Got:\n{actual_result}"
3334
)

0 commit comments

Comments
 (0)