Skip to content

Commit 90638b1

Browse files
committed
test: fix speed optimization
1 parent e7667d6 commit 90638b1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/unit/actions/test_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
class TestBoundAction:
1919
@pytest.fixture()
2020
def bound_running_action(self, client: Client):
21-
# Speed up tests that run `wait_until_finished`
22-
client._poll_interval_func = lambda _: 0.0
23-
client._poll_max_retries = 3
24-
2521
return BoundAction(
2622
client=client.actions,
2723
data=dict(id=14, status=Action.STATUS_RUNNING),

tests/unit/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def request_mock() -> mock.MagicMock:
2222

2323
@pytest.fixture()
2424
def client(request_mock) -> Client:
25-
c = Client(token="TOKEN")
25+
c = Client(
26+
token="TOKEN",
27+
# Speed up tests that use `_poll_interval_func`
28+
poll_interval=0.0,
29+
poll_max_retries=3,
30+
)
2631
c._client.request = request_mock
2732
return c
2833

0 commit comments

Comments
 (0)