tantalor / emend

Google App Engine site for tracking and sharing grammatical mistakes found on the web.

Home Page:http://www.emendapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing edit when proposal is substring of original

tantalor opened this issue · comments

If an edit's proposal is a substring of the original, then the current test routine fails (false-positive).

This happens because it first checks if the proposal is on the page. If the page has not been fixed, then the original is still present, but the original contains the proposal, so the test passes.

The test routine should be modified to first check to see if the original text is still on the page, and then (if not) check if the suggested text is on the page.

Since this modification will fail when the both the original and proposed text are on the page (such as when the original is replicated in a comment), it should only use this new method when the proposed is a substring of the original.

fixed test_substring_unfixed, added test_substring_uncertain, closed by dcc6827