File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1212
1313load_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
1625OUTPUT_DIR = Path ("output" )
1726OUTPUT_DIR .mkdir (exist_ok = True )
Original file line number Diff line number Diff 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 [
You can’t perform that action at this time.
0 commit comments