tests: make tarball output conditional on Python version
Python 3.8 changed the default tar file archive format:
https://docs.python.org/3.8/whatsnew/3.8.html#tarfile.
This commit teaches our tests about the new behavior.
Differential Revision: https://phab.mercurial-scm.org/D6986
--- a/tests/test-archive.t Sat Oct 05 16:23:00 2019 -0400
+++ b/tests/test-archive.t Sat Oct 05 15:28:52 2019 -0400
@@ -131,7 +131,8 @@
server: testing stub value
transfer-encoding: chunked
- body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505
+ body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505 (no-py38 !)
+ body: size=506, sha1=70926a04cb8887d0bcccf5380488100a10222def (py-38 !)
% tar.bz2 and zip disallowed should both give 403
403 Archive type not allowed: bz2
content-type: text/html; charset=ascii
@@ -159,7 +160,8 @@
server: testing stub value
transfer-encoding: chunked
- body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b
+ body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b (no-py38 !)
+ body: size=506, sha1=1bd1f8e8d3701704bd4385038bd9c09b81c77f4e (py38 !)
% zip and tar.gz disallowed should both give 403
403 Archive type not allowed: zip
content-type: text/html; charset=ascii
@@ -218,7 +220,8 @@
server: testing stub value
transfer-encoding: chunked
- body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505
+ body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505 (no-py38 !)
+ body: size=506, sha1=70926a04cb8887d0bcccf5380488100a10222def (py38 !)
% tar.bz2 and zip disallowed should both give 403
403 Archive type not allowed: bz2
content-type: text/html; charset=ascii
@@ -246,7 +249,8 @@
server: testing stub value
transfer-encoding: chunked
- body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b
+ body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b (no-py38 !)
+ body: size=506, sha1=1bd1f8e8d3701704bd4385038bd9c09b81c77f4e (py38 !)
% zip and tar.gz disallowed should both give 403
403 Archive type not allowed: zip
content-type: text/html; charset=ascii