Skip to content

Commit

Permalink
deselect some tests because they cost money or exceed rate limits
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Jan 25, 2025
1 parent 8164aa9 commit d99e0ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
GITHUB_API_KEY: "${{ secrets.GITHUB_TOKEN }}"
GITLAB_API_KEY: "${{ secrets.GITLAB_API_KEY }}"
run: |
pytest --cov=./ --cov-report=xml
pytest --cov=./ --cov-report=xml -m "not manual"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
markers =
manual: Tests that are excluded from default execution
4 changes: 3 additions & 1 deletion tests/test_agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

def test_agent_comment_on_issue():
import os
from functools import partial
Expand Down Expand Up @@ -31,7 +33,7 @@ def test_agent_comment_on_issue():
assert former_comment != new_comment
assert "print" in new_comment


@pytest.mark.manual
def test_agent_try_solving_issue():
import os
from functools import partial
Expand Down
8 changes: 8 additions & 0 deletions tests/test_endpoints.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
import pytest

@pytest.mark.manual
def test_anthropic():
from git_bob._endpoints import prompt_anthropic
assert "ok" in str(prompt_anthropic("Answer with ok!")).lower()

@pytest.mark.manual
def test_openai():
from git_bob._endpoints import prompt_openai
assert "ok" in str(prompt_openai("Answer with ok!")).lower()

@pytest.mark.manual
def test_google():
from git_bob._endpoints import prompt_googleai
assert "ok" in str(prompt_googleai("Answer with ok!")).lower()

@pytest.mark.manual
def test_mistral():
from git_bob._endpoints import prompt_mistral
assert "ok" in str(prompt_mistral("Answer with ok!")).lower()

@pytest.mark.manual
def test_azure():
from git_bob._endpoints import prompt_azure
assert "ok" in str(prompt_azure("Answer with ok!", model="gpt-4o-mini")).lower()

@pytest.mark.manual
def test_deepseek():
from git_bob._endpoints import prompt_deepseek
assert "ok" in str(prompt_deepseek("Answer with ok!")).lower()

0 comments on commit d99e0ed

Please sign in to comment.