-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious test failure in distutils #52976
Comments
Output of test_distutils on a older SuSE Linux system: FAILED (errors=1, skipped=5)
Traceback (most recent call last):
File "../Lib/test/test_distutils.py", line 18, in <module>
test_main()
File "../Lib/test/test_distutils.py", line 13, in test_main
test_support.run_unittest(distutils.tests.test_suite())
File "/home/xsupport/rtest/python-trunk/Lib/test/test_support.py", line 1038, in run_unittest
_run_suite(suite)
File "/home/xsupport/rtest/python-trunk/Lib/test/test_support.py", 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/test_archive_util.py", line 167, in test_compress_deprecated
make_tarball(base_name, 'dist', compress='compress')
File "/home/xsupport/rtest/python-trunk/Lib/distutils/archive_util.py", line 116, in make_tarball
spawn(cmd, dry_run=dry_run)
File "/home/xsupport/rtest/python-trunk/Lib/distutils/spawn.py", line 34, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/xsupport/rtest/python-trunk/Lib/distutils/spawn.py", 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. |
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. |
$ 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. |
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. What do you think ? |
Just skip the test, IMO. |
I'd also skip the test, this is not a bug in Python but a broken compress executable. |
Ronald, can you tell what would be the check to put in skipIf? |
The skip has been added: @unittest.skipUnless(find_executable('compress'),
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: