Page MenuHomePhabricator

tools_tests.OpenArchiveTestCase.test_open_archive_7z fails
Open, Needs TriagePublic


user@pc:~/python/core/tests {master}$ py27 -m unittest tools_tests.OpenArchiveTestCase.test_open_archive_7z
tests: max_retries reduced from 25 to 1
ERROR: test_open_archive_7z (tools_tests.OpenArchiveTestCase)
Test open_archive with 7za if installed.
Traceback (most recent call last):
  File "", line 159, in test_open_archive_7z
    self.assertEqual(self._get_content(self.base_file + '.7z'), self.original_content)
  File "", line 107, in _get_content
    with tools.open_archive(*args, **kwargs) as f:
  File "/home/user/python/core/pywikibot/tools/", line 1102, in open_archive
    'Unexpected STDERR output from 7za {0}'.format(stderr))
OSError: Unexpected STDERR output from 7za 
7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: /home/user/python/core/tests/data/xml/article-pyrus.xml.7z

Extracting  article-pyrus.xml

Everything is Ok

Size:       3871
Compressed: 1184

Ran 1 test in 0.016s

FAILED (errors=1)

stderr has data even when succesful.

Event Timeline

OK, found this:, which anyhow it does not solve my issue of having an old version.

Anyhow, I think stderr = in tools/ is going to block for large files.

    stderr =
    if stderr != b'':
        raise OSError(
            'Unexpected STDERR output from 7za {0}'.format(stderr))