diff --git a/tests/tests_e3/os/process/main_test.py b/tests/tests_e3/os/process/main_test.py index bf2a80d3..23a45c1b 100644 --- a/tests/tests_e3/os/process/main_test.py +++ b/tests/tests_e3/os/process/main_test.py @@ -155,6 +155,9 @@ def test_rlimit_ctrl_c(): The foreground process has been killed, leaving no foreground process. Signals were no longer propagated, so CTRL-C did nothing. """ + if "TOX_ENV_NAME" not in os.environ: + return + try: from ptyprocess import PtyProcess except ImportError: @@ -195,6 +198,9 @@ def test_rlimit_foreground_option(): Test if we can read/write from an interactive terminal using rlimit --foreground. """ + if "TOX_ENV_NAME" not in os.environ: + return + try: from ptyprocess import PtyProcess except ImportError: