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

Augie Fackler raf at durin42.com
Mon Apr 24 15:10:23 EDT 2017


> 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?

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

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

>  diff --git a/tests/test-http-bad-server.t b/tests/test-http-bad-server.t
[...]



More information about the Mercurial-devel mailing list