From 53cb3bd82703bb9fdc7ccc7346fa42f732aa42c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Cardao?= Date: Fri, 30 Jun 2023 16:18:04 +0200 Subject: [PATCH] Skip the rlimit_ctrl_c and rlimit_forground tests if you're not using tox. These tests need ptyprocess to run, so they always fail in a production environment. --- tests/tests_e3/os/process/main_test.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: