On 2019/10/13 7:24, Daniel Shahaf wrote:
> Yasuhito FUTATSUKI wrote on Sat, 12 Oct 2019 03:01 +00:00:
>> If textual comparison is sufficient here, it is right to open file
>> text mode (with suitable, unified set of `encoding', `errors', and `newline'
>> parameter). Otherwise, if strict comparison is needed, we must avoid unwanted,
>> not one-on-one corresponding conversion from bytes to str applied by Python.
>> In the latter case, it may be rather incorrect to use
>> compare_and_display_lines().
>
> Good question. I suspect textual comparison would suffice here, because
> this is a tree conflicts test, not a keywords semantics test, and the
> test case seems to revolve around the tree changes, not around the
> newline characters.
I see. Now I agree it would suffice here.
> So, how about:
>
> 1. Make the test use non-binary mode for changing and reading the
> file 'lambda'.
>
> 2. Locally revert the C part of r1841731 and make sure the modified test
> still (correctly) fails. (That revision both added the test and
> fixed the bug the test checks for.)
So it looks sufficient to me.
Thanks,
--
Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>
Received on 2019-10-13 06:02:26 CEST