We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
REPLICATE_API_TOKEN
1 parent b86aca7 commit f21086eCopy full SHA for f21086e
tests/test_stream.py
@@ -1,9 +1,16 @@
1
+import os
2
+
3
import pytest
4
5
import replicate
6
from replicate.stream import ServerSentEvent
7
8
+skip_if_no_token = pytest.mark.skipif(
9
+ os.environ.get("REPLICATE_API_TOKEN") is None, reason="REPLICATE_API_TOKEN not set"
10
+)
11
12
13
+@skip_if_no_token
14
@pytest.mark.asyncio
15
@pytest.mark.parametrize("async_flag", [True, False])
16
async def test_stream(async_flag, record_mode):
@@ -32,6 +39,7 @@ async def test_stream(async_flag, record_mode):
32
39
assert any(event.event == ServerSentEvent.EventType.DONE for event in events)
33
40
34
41
42
35
43
36
44
37
45
async def test_stream_prediction(async_flag, record_mode):
0 commit comments