diff options
author | Matt Clay <matt@mystile.com> | 2022-04-25 21:39:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 21:39:09 +0200 |
commit | 62d03c8e752ee35057031a91d7028e0a2e5d43e4 (patch) | |
tree | b03ed52d38dfabb54be656acc10ced6254ae36db /test/units/test_no_tty.py | |
parent | Fix use of deprecated antsibull-docs option. (diff) | |
download | ansible-62d03c8e752ee35057031a91d7028e0a2e5d43e4.tar.xz ansible-62d03c8e752ee35057031a91d7028e0a2e5d43e4.zip |
ansible-test - Fix subprocess management. (#77638)
* 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.
Diffstat (limited to '')
-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() |