Skip to content
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

test failures with python 3.8 #85

Closed
opoplawski opened this issue May 5, 2019 · 4 comments
Closed

test failures with python 3.8 #85

opoplawski opened this issue May 5, 2019 · 4 comments

Comments

@opoplawski
Copy link

nosetests-3.8 -v -e testing -e ssh_tests
======================================================================
ERROR:
tests.local_tests.LocalProcessTests.spawning_command_that_uses_path_env_variable_asks_if_command_is_installed
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
24, in run_test
    test_func(shell)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
225, in
spawning_command_that_uses_path_env_variable_asks_if_command_is_installed
    shell.spawn(["i-am-not-a-command"])
  File "/builddir/build/BUILD/spur.py-0.3.21/spur/local.py", line 67, in spawn
    process = subprocess.Popen(
  File "/usr/lib64/python3.8/subprocess.py", line 830, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1648, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'i-am-not-a-command'

======================================================================
ERROR:
tests.local_tests.LocalProcessTests.spawning_non_existent_command_raises_specific_no_such_command_exception
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
24, in run_test
    test_func(shell)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
214, in spawning_non_existent_command_raises_specific_no_such_command_exception
    shell.spawn(["bin/i-am-not-a-command"])
  File "/builddir/build/BUILD/spur.py-0.3.21/spur/local.py", line 67, in spawn
    process = subprocess.Popen(
  File "/usr/lib64/python3.8/subprocess.py", line 830, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1648, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory:
'bin/i-am-not-a-command'

======================================================================
ERROR:
tests.local_tests.LocalProcessTests.using_non_existent_command_and_correct_cwd_raises_no_such_command_exception
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
24, in run_test
    test_func(shell)
  File "/builddir/build/BUILD/spur.py-0.3.21/tests/process_test_set.py", line
317, in
using_non_existent_command_and_correct_cwd_raises_no_such_command_exception
    shell.spawn(["bin/i-am-not-a-command"], cwd="/bin")
  File "/builddir/build/BUILD/spur.py-0.3.21/spur/local.py", line 67, in spawn
    process = subprocess.Popen(
  File "/usr/lib64/python3.8/subprocess.py", line 830, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1648, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory:
'bin/i-am-not-a-command'

Perhaps exception names have changed with python 3.8?

@opoplawski
Copy link
Author

ping?

@mgorny
Copy link

mgorny commented Jun 12, 2020

This code is just horrible :-(. It seems to rely on internal fields of Python exceptions, and these changed in py3.8.

@mwilliamson
Copy link
Owner

Thanks for the report, this is now fixed in master.

@opoplawski
Copy link
Author

Looks good. Thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants