-
Notifications
You must be signed in to change notification settings - Fork 313
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_hook_writes_to_stderr failure "/bin/sh command not found" #1383
Comments
This test was added in PR #1372, do you know anything about it @iainelder ? |
Yes, I added it. Not sure why it would fail. I'll take a look tomorrow! |
To follow your repro I need to install pyenv. I'll figure out how to do that this week. What do you see when you skip the pyenv command and run For me, all the tests pass in tox's py39 environment. |
Your My The shells write different error messages when they can't find the command.
The test expects Your All I want to test here is that the hook writes to the standard error stream. I think I should rewrite it so that it no longer depends on system-defined side effects of a missing command. A simpler test would just echo text to the standard error stream and check that the same text comes out. |
The old test expected `/bin/sh` to write Dash's error message. This works on Ubuntu 20. It old test failed when `/bin/sh` pointed to `/bin/bash`. This happens on macOS. The new test no longer depends on system-defined side effects of a missing command. It just writes to the standard error stream and checks that the same text comes out.
The old test expected `/bin/sh` to write Dash's error message. This works on Ubuntu 20. It old test failed when `/bin/sh` pointed to `/bin/bash`. This happens on macOS. The new test no longer depends on system-defined side effects of a missing command. It just writes to the standard error stream and checks that the same text comes out.
Subject of the issue
FAILED tests/test_hooks/test_cmd.py::test_hook_writes_to_stderr - AssertionError: assert '/bin/sh: mis...and not found' == '/bin/sh: 1: ...nd: not found'
when I run Sceptre unit test.Your environment
Steps to reproduce
Python 3.9.7
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)
Copyright (C) 2007 Free Software Foundation, Inc.
Expected behaviour
All tests pass
Actual behaviour
1 test failure..
The text was updated successfully, but these errors were encountered: