diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-01-06 08:15:54 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-02-16 06:31:27 +0100 |
commit | c4cbb861a8becbba6081a5aabd63bdefeae3064e (patch) | |
tree | ab1627be5467a6d32094624e39a1dde49ba5b9c7 | |
parent | Prevent tests from detecting our fake tzdata package (diff) | |
download | cpython-c4cbb861a8becbba6081a5aabd63bdefeae3064e.tar.gz cpython-c4cbb861a8becbba6081a5aabd63bdefeae3064e.tar.bz2 cpython-c4cbb861a8becbba6081a5aabd63bdefeae3064e.zip |
test_lzma: Skip tests requiring extra-filtersgentoo-3.13.0a4
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | Lib/test/test_lzma.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py index 65e6488c5d7..71f2dea38dd 100644 --- a/Lib/test/test_lzma.py +++ b/Lib/test/test_lzma.py @@ -118,14 +118,17 @@ class CompressorDecompressorTestCase(unittest.TestCase): lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_1) self._test_decompressor(lzd, COMPRESSED_RAW_1, lzma.CHECK_NONE) + @unittest.skip("Gentoo: requires app-arch?xz-utils[extra-filters]") def test_decompressor_raw_2(self): lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_2) self._test_decompressor(lzd, COMPRESSED_RAW_2, lzma.CHECK_NONE) + @unittest.skip("Gentoo: requires app-arch?xz-utils[extra-filters]") def test_decompressor_raw_3(self): lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_3) self._test_decompressor(lzd, COMPRESSED_RAW_3, lzma.CHECK_NONE) + @unittest.skip("Gentoo: requires app-arch?xz-utils[extra-filters]") def test_decompressor_raw_4(self): lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_4) self._test_decompressor(lzd, COMPRESSED_RAW_4, lzma.CHECK_NONE) @@ -288,12 +291,14 @@ class CompressorDecompressorTestCase(unittest.TestCase): lzd = LZMADecompressor() self._test_decompressor(lzd, cdata, lzma.CHECK_NONE) + @unittest.skip("Gentoo: requires app-arch?xz-utils[extra-filters]") def test_roundtrip_raw(self): lzc = LZMACompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_4) cdata = lzc.compress(INPUT) + lzc.flush() lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_4) self._test_decompressor(lzd, cdata, lzma.CHECK_NONE) + @unittest.skip("Gentoo: requires app-arch?xz-utils[extra-filters]") def test_roundtrip_raw_empty(self): lzc = LZMACompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_4) cdata = lzc.compress(INPUT) @@ -447,6 +452,8 @@ class CompressDecompressFunctionTestCase(unittest.TestCase): COMPRESSED_RAW_1, lzma.FORMAT_RAW, filters=FILTERS_RAW_1) self.assertEqual(ddata, INPUT) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return ddata = lzma.decompress( COMPRESSED_RAW_2, lzma.FORMAT_RAW, filters=FILTERS_RAW_2) self.assertEqual(ddata, INPUT) @@ -464,6 +471,8 @@ class CompressDecompressFunctionTestCase(unittest.TestCase): self.assertRaises(LZMAError, lzma.decompress, COMPRESSED_ALONE[:128]) self.assertRaises(LZMAError, lzma.decompress, COMPRESSED_RAW_1[:128], format=lzma.FORMAT_RAW, filters=FILTERS_RAW_1) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return self.assertRaises(LZMAError, lzma.decompress, COMPRESSED_RAW_2[:128], format=lzma.FORMAT_RAW, filters=FILTERS_RAW_2) self.assertRaises(LZMAError, lzma.decompress, COMPRESSED_RAW_3[:128], @@ -499,6 +508,8 @@ class CompressDecompressFunctionTestCase(unittest.TestCase): ddata = lzma.decompress(cdata) self.assertEqual(ddata, INPUT) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return cdata = lzma.compress(INPUT, lzma.FORMAT_RAW, filters=FILTERS_RAW_4) ddata = lzma.decompress(cdata, lzma.FORMAT_RAW, filters=FILTERS_RAW_4) self.assertEqual(ddata, INPUT) @@ -803,6 +814,8 @@ class FileTestCase(unittest.TestCase): format=lzma.FORMAT_RAW, filters=FILTERS_RAW_1) as f: self.assertEqual(f.read(), INPUT) self.assertEqual(f.read(), b"") + # Gentoo: these require app-arch?xz-utils[extra-filters] + return with LZMAFile(BytesIO(COMPRESSED_RAW_2), format=lzma.FORMAT_RAW, filters=FILTERS_RAW_2) as f: self.assertEqual(f.read(), INPUT) @@ -839,6 +852,8 @@ class FileTestCase(unittest.TestCase): self.assertEqual(f.read(), INPUT * 5) with LZMAFile(BytesIO(COMPRESSED_XZ + COMPRESSED_ALONE)) as f: self.assertEqual(f.read(), INPUT * 2) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return with LZMAFile(BytesIO(COMPRESSED_RAW_3 * 4), format=lzma.FORMAT_RAW, filters=FILTERS_RAW_3) as f: self.assertEqual(f.read(), INPUT * 4) @@ -973,6 +988,8 @@ class FileTestCase(unittest.TestCase): self.assertListEqual(list(iter(f)), lines) with LZMAFile(BytesIO(COMPRESSED_ALONE), format=lzma.FORMAT_ALONE) as f: self.assertListEqual(list(iter(f)), lines) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return with LZMAFile(BytesIO(COMPRESSED_RAW_2), format=lzma.FORMAT_RAW, filters=FILTERS_RAW_2) as f: self.assertListEqual(list(iter(f)), lines) @@ -1017,6 +1034,8 @@ class FileTestCase(unittest.TestCase): f.write(INPUT) expected = lzma.compress(INPUT, format=lzma.FORMAT_ALONE) self.assertEqual(dst.getvalue(), expected) + # Gentoo: these require app-arch?xz-utils[extra-filters] + return with BytesIO() as dst: with LZMAFile(dst, "w", format=lzma.FORMAT_RAW, filters=FILTERS_RAW_2) as f: @@ -1402,6 +1421,8 @@ class MiscellaneousTestCase(unittest.TestCase): self.assertEqual(filterspec["dict_size"], 8 << 20) # see gh-104282 + # Gentoo: these require app-arch?xz-utils[extra-filters] + return filters = [lzma.FILTER_X86, lzma.FILTER_POWERPC, lzma.FILTER_IA64, lzma.FILTER_ARM, lzma.FILTER_ARMTHUMB, lzma.FILTER_SPARC] |