gix bug in benchmark test.
This commit is contained in:
Submodule mediawiki-php-wikidiff2 updated: 67363910e5...7b40de3fe9
@@ -27,14 +27,12 @@ def stream_text_by_article_streaming(file_path: str) -> Generator[Tuple[Any, Lis
|
|||||||
print(f"An error occurred: {e}")
|
print(f"An error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
last_text = ""
|
|
||||||
last_article_id = None
|
|
||||||
|
|
||||||
|
|
||||||
with open('/dev/null', 'w') as of:
|
with open('/dev/null', 'w') as of:
|
||||||
for article_id, text in stream_text_by_article_streaming(sys.argv[1]):
|
for _, texts in stream_text_by_article_streaming(sys.argv[1]):
|
||||||
if article_id != last_article_id:
|
|
||||||
last_article_id = article_id
|
|
||||||
last_text = ""
|
last_text = ""
|
||||||
|
for text in texts:
|
||||||
result = differ.inline_json_diff(last_text, text)
|
result = differ.inline_json_diff(last_text, text)
|
||||||
print(result, file=of)
|
print(result, file=of)
|
||||||
|
last_text = text
|
||||||
|
|||||||
Reference in New Issue
Block a user