[PATCH stable] tests: add lots of regex matching to test-http-bad-server.t

Sean Farley sean at farley.io
Mon Apr 24 19:46:05 UTC 2017


Augie Fackler <raf at durin42.com> writes:

>> On Apr 24, 2017, at 15:05, Gregory Szorc <gregory.szorc at gmail.com> wrote:
>> 
>> On Mon, Apr 24, 2017 at 11:39 AM, Augie Fackler <raf at durin42.com> wrote:
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1493059110 14400
>> #      Mon Apr 24 14:38:30 2017 -0400
>> # Branch stable
>> # Node ID 52cca17ac523b490acdab259e794e7c2898efeda
>> # Parent  40cf693fc07d846502f9c15a1602880ca99d7b56
>> tests: add lots of regex matching to test-http-bad-server.t
>> 
>> This makes the test pass in Python 2.6. It's all one of two problems:
>> 
>> 1)
>>   abort: error: '' (2.7)
>>   vs
>>   abort: error: (2.6)
>> 
>> 2) 65537 (2.7) vs -1 (2.6)
>> 
>> With some...unfortunate escaping required due to how regular
>> expressions work. Sigh.
>> 
>> Ugh. I'd be tempted to require 2.7 to run the test.
>
> I thought about that. For a counterproposal, how about we decide that 4.2 (or 4.3, if we're feeling generous) is the last version to support 2.6, and we plan to back this "fix" out when we drop 2.6?

Fine by me.

>> Another alternative is to monkeypatch readline() so it does the right thing. We already have hacks in keepalive.py to work around bugs in the stdlib.
>
> eww

M-x eww ;-)

>> FWIW since this test is already on the flaky side, I was considering just disabling it wholesale on stable until we can make it more robust next cycle.
>
> Eh, I think the test has merit. I'd rather just tweak it so it passes and do something more serious in the 4.3 cycle.

Yeah, this is the approach I would do; so the patch looks fine to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170424/be368a6b/attachment.asc>


More information about the Mercurial-devel mailing list