This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_lzma: Multiple test failures when liblzma is built without complete codec set
Type: enhancement Stage:
Components: Tests Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mgorny, xtreak
Priority: normal Keywords:

Created on 2018-10-03 10:32 by mgorny, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
lzma-test.txt mgorny, 2018-10-03 10:32 verbose test_lzma output
Messages (1)
msg326960 - (view) Author: Michał Górny (mgorny) * Date: 2018-10-03 10:32
xz-utils has four options to configure codecs supported by liblzma:

  --enable-encoders
  --enable-decoders
  --enable-match-finders
  --enable-checks

In Gentoo, we're using those options to optionally provide smaller footprint liblzma builds that include only the standard set of codecs used by .xz archives (i.e. that work with any archive created by xz/lzma without expert options used).  However, it seems that the CPython test suite wrongly presumes that all codecs are always available and it fails on LZMAErrors when those are not present.

I'm attaching the verbose output of test_lzma.

I think the best solution here would be to catch LZMAError and skipTest() if it's LZMA_OPTIONS_ERROR.  I think this would be best done by exposing the underlying error code in LZMAError exception (rather than string-matching, though the latter would also work).
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 79064
2018-10-04 06:36:59xtreaksetnosy: + xtreak
2018-10-03 10:32:44mgornycreate