Skip to content

Commit b5f576b

Browse files
committed
Fix test flakiness in test_execute
1 parent f9aa16e commit b5f576b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/unit/test_utils.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import pytest
77
from botocore import credentials
88
from botocore.exceptions import ClientError
9-
from hypothesis import given
10-
from hypothesis.strategies import lists, text
119

1210
from aws_gate import __version__
1311
from aws_gate.constants import DEFAULT_GATE_BIN_PATH
@@ -131,12 +129,11 @@ def test_region_validation():
131129
assert not is_existing_region(region_name="unknown-region-1")
132130

133131

134-
@given(text(), lists(text()))
135-
def test_execute(mocker, cmd, args):
132+
def test_execute(mocker):
136133
mock_output = mocker.MagicMock(stdout=b"output")
137134
mocker.patch("aws_gate.utils.subprocess.run", return_value=mock_output)
138135

139-
assert execute(cmd, args) == "output"
136+
assert execute("ls", ["-l"]) == "output"
140137

141138

142139
def test_execute_environment(mocker):

0 commit comments

Comments
 (0)