commit | 46113e0cf32748f66cf64cd633984d143b433cd1 | [log] [tgz] |
---|---|---|
author | Pablo Galindo <Pablogsal@gmail.com> | Sun Oct 13 02:40:24 2019 +0100 |
committer | GitHub <noreply@github.com> | Sun Oct 13 02:40:24 2019 +0100 |
tree | 1d384df701344e4a090ef690654318d989af0e98 | |
parent | 27b33fb41a7c64a6211d73d14804aa0cd6defccb [diff] [blame] |
bpo-38456: Handle the case when there is no 'true' command (GH-16739)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 2231ff4..9e96a6d 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py
@@ -59,6 +59,8 @@ def setUpModule(): shell_true = shutil.which('true') + if shell_true is None: + return if (os.access(shell_true, os.X_OK) and subprocess.run([shell_true]).returncode == 0): global ZERO_RETURN_CMD