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.

Title: Spurious test failure in distutils
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, iritkatriel, pitrou, ronaldoussoren, tarek
Priority: normal Keywords:

Created on 2010-05-16 12:21 by ronaldoussoren, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg105862 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-05-16 12:21
Output of test_distutils on a older SuSE Linux system:

FAILED (errors=1, skipped=5)
Traceback (most recent call last):
  File "../Lib/test/", line 18, in <module>
  File "../Lib/test/", line 13, in test_main
  File "/home/xsupport/rtest/python-trunk/Lib/test/", line 1038, in run_unittest
  File "/home/xsupport/rtest/python-trunk/Lib/test/", line 1021, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "/home/xsupport/rtest/python-trunk/Lib/distutils/tests/", line 167, in test_compress_deprecated
    make_tarball(base_name, 'dist', compress='compress')
  File "/home/xsupport/rtest/python-trunk/Lib/distutils/", line 116, in make_tarball
    spawn(cmd, dry_run=dry_run)
  File "/home/xsupport/rtest/python-trunk/Lib/distutils/", line 34, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/xsupport/rtest/python-trunk/Lib/distutils/", line 141, in _spawn_posix
    (cmd[0], exit_status)
DistutilsExecError: command 'compress' failed with exit status 1

This system has a fake 'compress' command that only supports uncompress functionality:

$ compress --help
Usage: compress OPTION FILE
Dummy script for uncompressing legacy shar files.

with OPTION in:
      --help      display this help and exit
      --version   output version information and exit

  -d              uncompress

Use `gzip' for compressing files.
msg105864 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-05-16 12:35
ouch, what a bad practice... 

The compress feature is going away anyway.

Could you tell me what "compress --version" says ?

Maybe we can use that output to discard this fake command when looking for the compress program.
msg105866 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-05-16 12:41
$ compress --version
compress - sharutils 4.2c

And yes, this is jucky behavior. Most systems shouldn't be affected by this because sharutils isn't used a lot these days.
msg105899 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-05-17 11:13
So do you know if this is specific to all sharutils versions ? 

I could read the version and raise a specific error in that case.
*or* just not fix this bug and fix the test so it's permissive in this very particular case (by looking at the compression version)

What do you think ?
msg105900 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-05-17 11:50
Just skip the test, IMO.
msg105914 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-05-17 15:26
I'd also skip the test, this is not a bug in Python but a broken compress executable.
msg131598 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-21 01:22
Ronald, can you tell what would be the check to put in skipIf?
msg380566 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-11-09 00:04
The skip has been added:

                     'The compress program is required')
def test_compress_deprecated(self):
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 52976
2020-11-09 00:04:53iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg380566

resolution: out of date
stage: needs patch -> resolved
2013-01-22 12:38:38ezio.melottisetversions: + Python 3.4, - Python 3.1
2011-03-21 01:22:10eric.araujosetnosy: ronaldoussoren, pitrou, tarek, eric.araujo
messages: + msg131598
versions: + Python 3.3
2010-11-26 04:46:18eric.araujosetnosy: ronaldoussoren, pitrou, tarek, eric.araujo
components: - Distutils2
versions: - 3rd party
2010-11-26 04:46:01eric.araujosetnosy: + eric.araujo

components: + Distutils2
versions: + 3rd party, Python 3.1, Python 3.2
2010-05-17 15:26:04ronaldoussorensetmessages: + msg105914
2010-05-17 11:50:59pitrousetnosy: + pitrou
messages: + msg105900
2010-05-17 11:13:23tareksetmessages: + msg105899
2010-05-16 12:41:44ronaldoussorensetmessages: + msg105866
2010-05-16 12:35:11tareksetmessages: + msg105864
2010-05-16 12:21:56ronaldoussorencreate