You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test update detection should operate according to these rules
if the generated name for a particular test is test_description_from_the_canonical_data, and there already exists a test named test_description_from_the_canonical_data, then check if the text of the test is equal to the newly generated test text:
if the text of the test is equal to the generated test text, then nothing has changed, so we leave the old test in place and do not write the new test
if the text of the test is not equal to the generated test text, then something has changed. We can't expect an automatic tool to know which to keep, so we should keep the existing test, change the name by appending a suffix, and insert the generated test. The format I expect is test_description_from_the_canonical_data_N, where N is the lowest integer > 1 which does not generate a name collision
if the generated name for a particular test is test_description_from_the_canonical_data, and there already exists a test named description_in_other_words, an automatic tool can't be expected to notice that the test exists already, so simply retain the existing test and also insert the generated test. The tool user or the PR reviewer are the ones who should catch those cases.
given the rules above, we need neither //NEW nor //UPDATED. Therefore, those comments should no longer be emitted.
The text was updated successfully, but these errors were encountered:
Test update detection should operate according to these rules
test_description_from_the_canonical_data
, and there already exists a test namedtest_description_from_the_canonical_data
, then check if the text of the test is equal to the newly generated test text:test_description_from_the_canonical_data_N
, whereN
is the lowest integer > 1 which does not generate a name collisiontest_description_from_the_canonical_data
, and there already exists a test nameddescription_in_other_words
, an automatic tool can't be expected to notice that the test exists already, so simply retain the existing test and also insert the generated test. The tool user or the PR reviewer are the ones who should catch those cases.//NEW
nor//UPDATED
. Therefore, those comments should no longer be emitted.The text was updated successfully, but these errors were encountered: