Patchwork D7942: py3: make test-http-bad-server.t conditional on Python 3.6+

login
register
mail settings
Submitter phabricator
Date Jan. 18, 2020, 7:43 a.m.
Message ID <differential-rev-PHID-DREV-qa4v22sablpa2cfiwvuh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44517/
State New
Headers show

Comments

phabricator - Jan. 18, 2020, 7:43 a.m.
indygreg created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm not sure what's going on here, but we need to limit these lines
  to a Python 3.6 version range check because Python 3.5's behavior
  is subtly different. We already had some lines conditional on
  Python 3.5+ and 3.6+. I guess whoever made this test pass on 3.6+
  forgot to test on 3.5+.
  
  With this change, the test harness is clean on Python 3.5 on Linux
  on my machine.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7942

AFFECTED FILES
  tests/test-http-bad-server.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/tests/test-http-bad-server.t b/tests/test-http-bad-server.t
--- a/tests/test-http-bad-server.t
+++ b/tests/test-http-bad-server.t
@@ -696,7 +696,7 @@ 
   write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
   write(20 from 20) -> (235) Content-Length: 42\r\n (no-py3 !)
   write(2 from 2) -> (233) \r\n (no-py3 !)
-  write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !)
+  write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py36 !)
   readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
   readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
   readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
@@ -717,15 +717,15 @@ 
   write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n (no-py3 !)
   write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n (no-py3 !)
   write(2 from 2) -> (24) \r\n (no-py3 !)
-  write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (no-py3 !)
-  write(9 from 9) -> (9) 4\r\nnone\r\n (no-py3 !)
-  write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py3 !)
+  write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (no-py36 !)
+  write(9 from 9) -> (9) 4\r\nnone\r\n (no-py36 !)
+  write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py36 !)
   write limit reached; closing socket
   $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
   Traceback (most recent call last):
   Exception: connection closed after sending N bytes
   
-  write(27) -> 15\r\nInternal Server Error\r\n (no-py3 !)
+  write(27) -> 15\r\nInternal Server Error\r\n (no-py36 !)
 
   $ rm -f error.log