diff options
author | Matt Clay <matt@mystile.com> | 2022-04-27 23:07:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 23:07:15 +0200 |
commit | 5c2d830dea986a8c7bd8c286b86bdce326cd7eb1 (patch) | |
tree | a4c4e26f1f9e27d75c0e383ef15bb175dd3b3879 /test/units/test_no_tty.py | |
parent | Update guide_vultr.rst (#77665) (diff) | |
download | ansible-5c2d830dea986a8c7bd8c286b86bdce326cd7eb1.tar.xz ansible-5c2d830dea986a8c7bd8c286b86bdce326cd7eb1.zip |
ansible-test - Fix subprocess management. (#77641)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.
Diffstat (limited to 'test/units/test_no_tty.py')
-rw-r--r-- | test/units/test_no_tty.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/test_no_tty.py b/test/units/test_no_tty.py new file mode 100644 index 0000000000..290c0b922a --- /dev/null +++ b/test/units/test_no_tty.py @@ -0,0 +1,7 @@ +import sys + + +def test_no_tty(): + assert not sys.stdin.isatty() + assert not sys.stdout.isatty() + assert not sys.stderr.isatty() |