Skip to content

Commit

Permalink
fixed timing
Browse files Browse the repository at this point in the history
  • Loading branch information
areibman committed Oct 31, 2024
1 parent d4890b2 commit c581e07
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ max_line_length = 120

[project.scripts]
agentops = "agentops.cli:main"

[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
2 changes: 1 addition & 1 deletion tests/test_record_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setup_method(self):
self.url = "https://api.agentops.ai"
self.api_key = "11111111-1111-4111-8111-111111111111"
self.event_type = "test_event_type"
agentops.init(self.api_key, max_wait_time=5, auto_start_session=False)
agentops.init(self.api_key, max_wait_time=50, auto_start_session=False)

def test_record_action_decorator(self, mock_req):
agentops.start_session()
Expand Down
14 changes: 5 additions & 9 deletions tests/test_teardown.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import requests_mock
from agentops import Client
import agentops


@pytest.fixture(autouse=True, scope="function")
Expand All @@ -21,12 +21,8 @@ def mock_req():


class TestSessions:
def setup_method(self, mock_req):
self.api_key = "11111111-1111-4111-8111-111111111111"
self.event_type = "test_event_type"
Client().configure(api_key=self.api_key)
Client().initialize()

def test_exit(self, mock_req):
# Tests should not hang.
...
url = "https://api.agentops.ai"
api_key = "11111111-1111-4111-8111-111111111111"
tool_name = "test_tool_name"
agentops.init(api_key, max_wait_time=5, auto_start_session=False)

0 comments on commit c581e07

Please sign in to comment.