from bindery.diffing import diff_html, html_to_blocks, text_hash def test_random_class_names_do_not_count_as_changes(): a = '
Hello there.
Second
Hello there.
Second
one
") != text_hash("two
") def test_diff_counts_and_word_level_changes(): old = "Same.
The cat sat.
Gone.
" new = "Same.
The dog sat.
Gone.
Added.
" result = diff_html(old, new) assert (result["changed"], result["added"], result["removed"]) == (1, 1, 0) assert "a
", "<script>alert(1)</script>
") assert "