AutoPercenty3/tmp_fix_test.py

15 lines
635 B
Python

# fix_test.py - 임시 수정 스크립트
content = open('tests/test_papago_curl.py', encoding='utf-8').read()
lines = content.splitlines(keepends=True)
for i, line in enumerate(lines):
if 'r[0] if r else' in line and 'deviceId' in line:
print(f"수정 대상 라인 {i+1}: {repr(line)}")
lines[i] = (
" first = r[0] if r else \"?\"\n"
" print(f\" '{word}' -> '{first}' (deviceId: {translator.device_id})\")\n"
)
print(f"수정 후: {repr(lines[i])}")
break
open('tests/test_papago_curl.py', 'w', encoding='utf-8').writelines(lines)
print("완료")