[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Test failures with Python 3 (Re: PMCs: any Hackathon requests? (deadline 11 October))

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 12 Oct 2019 22:24:02 +0000

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.

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.)

Alternatively, we could make the test verify the contents of 'lambda' in binary
mode without using compare_and_display_lines.

Makes sense?

Cheers,

Daniel
Received on 2019-10-13 00:24:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.