Skip to content

Commit 3c2f829

Browse files
authored
feat: mark all integration tests as flaky with auto-retry (#87)
* feat: mark all integration tests as flaky with auto-retry * feat: add extra line for readability in conftest.py
1 parent 6cb173c commit 3c2f829

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/integration/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212

1313
load_dotenv()
1414

15+
16+
def pytest_collection_modifyitems(items):
17+
"""Mark all integration tests as flaky with auto-retry."""
18+
for item in items:
19+
# Check if test is in the integration directory
20+
if "integration" in str(item.fspath):
21+
item.add_marker(pytest.mark.flaky(reruns=9, reruns_delay=1))
22+
23+
1524
# Create output directory for test audio files
1625
OUTPUT_DIR = Path("output")
1726
OUTPUT_DIR.mkdir(exist_ok=True)

tests/integration/test_tts_websocket_integration.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def text_stream():
3434
# Save the audio
3535
save_audio(audio_chunks, "test_websocket_streaming.mp3")
3636

37-
@pytest.mark.flaky(reruns=9, reruns_delay=1)
3837
@pytest.mark.parametrize(
3938
"model",
4039
[
@@ -226,7 +225,6 @@ async def text_stream():
226225
save_audio(audio_chunks, "test_async_websocket_streaming.mp3")
227226

228227
@pytest.mark.asyncio
229-
@pytest.mark.flaky(reruns=9, reruns_delay=1)
230228
@pytest.mark.parametrize(
231229
"model",
232230
[

0 commit comments

Comments
 (0)