From 473fa5444186143f58dffbf1d14982a8905b1fc8 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 5 Sep 2020 11:50:57 +0200 Subject: Fix wrongly determining uncompressed size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flush the file after writing to ensure that .buffer.tell() gives non-zero value. This fixes a number of cases of Manifests not being compressed. It also pointed out a major mistake in profile tests. Signed-off-by: Michał Górny --- tests/test_recursiveloader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/test_recursiveloader.py') diff --git a/tests/test_recursiveloader.py b/tests/test_recursiveloader.py index ee11e19..37bfae9 100644 --- a/tests/test_recursiveloader.py +++ b/tests/test_recursiveloader.py @@ -2068,8 +2068,7 @@ COMMON_COMPRESS_VARIANTS = ( list(itertools.chain.from_iterable( [(BasicTestLayout, 0, algo, [x for x in BasicTestLayout.MANIFESTS if x != 'Manifest']), - pytest.param(BasicTestLayout, 64, algo, ['sub/Manifest'], - marks=pytest.mark.xfail), + (BasicTestLayout, 64, algo, ['sub/Manifest']), ] for algo in COMPRESSION_ALGOS)) + [(CompressedSubManifestLayout, 0, 'gz', ['sub/Manifest']), (CompressedSubManifestLayout, 4096, 'gz', []), -- cgit v1.2.3