Skip to content

Commit b331ab7

Browse files
Do not sleep in retry tests (#158)
* Do not sleep in retry tests * Update tests/unit/conftest.py Co-authored-by: grahamalama <[email protected]> * Remove autoused fixture Co-authored-by: grahamalama <[email protected]>
1 parent bf53093 commit b331ab7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/unit/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Module for setting up pytest fixtures
33
"""
4+
import time
45
from unittest import mock
56

67
import pytest
@@ -180,3 +181,9 @@ def action_example() -> Action:
180181
@pytest.fixture
181182
def actions_example(action_example) -> Actions:
182183
return Actions.parse_obj([action_example])
184+
185+
186+
@pytest.fixture(autouse=True)
187+
def sleepless(monkeypatch):
188+
# https://stackoverflow.com/a/54829577
189+
monkeypatch.setattr(time, "sleep", lambda s: None)

0 commit comments

Comments
 (0)