Skip to content

Commit c752b16

Browse files
committed
Fix tox formatting requirements
1 parent 068e57f commit c752b16

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
steps:
2+
- uses: actions/checkout@v2
3+
4+
- name: Set up Python
5+
uses: actions/setup-python@v2
6+
with:
7+
python-version: '3.x'
8+
9+
- name: Install dependencies
10+
run: |
11+
python -m pip install --upgrade pip
12+
pip install -e .[test]
13+
14+
- name: Run tests
15+
run: |
16+
pytest tests/

test_responses.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
default: "Hello, this is a mock response."
1111
"""
1212

13+
@pytest.fixture(autouse=True)
14+
def mock_responses():
15+
# Override the default responses path for testing
16+
ResponseConfig.DEFAULT_RESPONSES_PATH = "tests/test_responses.yml"
17+
return ResponseConfig()
18+
1319
@pytest.fixture(autouse=True)
1420
def test_response_config(monkeypatch):
1521
"""Use a test-specific responses.yml file."""

tests/test_responses.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Default test responses
2+
default:
3+
response: "This is a default test response"
4+
5+
# Test-specific responses
6+
test_chat:
7+
response: "This is a test chat response"
8+
9+
test_completion:
10+
response: "This is a test completion response"
11+
112
responses:
213
"what colour is the sky?": "The sky is blue during a clear day due to a phenomenon called Rayleigh scattering."
314
"who is the president?": "This is a mock response. In a production environment, this would be replaced with accurate, up-to-date information."

0 commit comments

Comments
 (0)