torproject / stem

Python controller library for Tor
https://stem.torproject.org/
GNU Lesser General Public License v3.0
257 stars 75 forks source link

`test_decompress_zstd` fails with `zstd` installed #142

Open mtelka opened 9 months ago

mtelka commented 9 months ago

The test_decompress_zstd test fails with the zstd (instead of zstandard) installed:

ERROR: test_decompress_zstd
----------------------------------------------------------------------
Traceback (most recent call last):
  File "$(BUILD_DIR)/stem/descriptor/__init__.py", line 236, in decompress
    return self._decompression_func(self._module, content)
  File "$(BUILD_DIR)/stem/descriptor/__init__.py", line 247, in _zstd_decompress
    with module.ZstdDecompressor().write_to(output_buffer) as decompressor:
AttributeError: module 'zstd' has no attribute 'ZstdDecompressor'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "$(BUILD_DIR)/test/unit/descriptor/compression.py", line 26, in test_decompress_zstd
    self._check_file(Compression.ZSTD, 'compressed_zstd')
  File "$(BUILD_DIR)/test/unit/descriptor/compression.py", line 38, in _check_file
    content = compression.decompress(compressed_file.read())
  File "$(BUILD_DIR)/stem/descriptor/__init__.py", line 238, in decompress
    raise IOError('Failed to decompress as %s: %s' % (self, exc))
OSError: Failed to decompress as zstd: module 'zstd' has no attribute 'ZstdDecompressor'