Skip to content

Commit

Permalink
Skip the rlimit_ctrl_c and rlimit_forground tests if you're not using…
Browse files Browse the repository at this point in the history
… tox.

These tests need ptyprocess to run, so they always fail in a production environment.
  • Loading branch information
leocardao committed Jun 30, 2023
1 parent 8d119bf commit 53cb3bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/tests_e3/os/process/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 53cb3bd

Please sign in to comment.