diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43654d6..1b63d02 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -38,7 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' cache: pip cache-dependency-path: setup.py - name: Install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1884fc9..1a4d392 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] pydantic: ["==1.10.2", ">=2.0.0"] steps: - uses: actions/checkout@v4 diff --git a/setup.py b/setup.py index 1f6adcd..bc77c22 100644 --- a/setup.py +++ b/setup.py @@ -63,5 +63,5 @@ setup( "types-setuptools", ] }, - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/tests/test_keys.py b/tests/test_keys.py index 5c1d7d5..5a5649a 100644 --- a/tests/test_keys.py +++ b/tests/test_keys.py @@ -52,6 +52,9 @@ def test_keys_list(monkeypatch, tmpdir, args): assert result2.output.strip() == "openai" +@pytest.mark.httpx_mock( + assert_all_requests_were_expected=False, can_send_already_matched_responses=True +) def test_uses_correct_key(mocked_openai_chat, monkeypatch, tmpdir): user_dir = tmpdir / "user-dir" pathlib.Path(user_dir).mkdir() diff --git a/tests/test_templates.py b/tests/test_templates.py index 6289c38..57c8f83 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -133,19 +133,21 @@ def test_templates_prompt_save(templates_path, args, expected_prompt, expected_e "Summarize this: Input text", None, ), - ( + pytest.param( "boo", ["-s", "s"], None, None, "Error: Cannot use -t/--template and --system together", + marks=pytest.mark.httpx_mock(assert_all_responses_were_requested=False), ), - ( + pytest.param( "prompt: 'Say $hello'", [], None, None, "Error: Missing variables: hello", + marks=pytest.mark.httpx_mock(assert_all_responses_were_requested=False), ), ( "prompt: 'Say $hello'", @@ -183,4 +185,4 @@ def test_template_basic( else: assert result.exit_code == 1 assert result.output.strip() == expected_error - mocked_openai_chat.reset(assert_all_responses_were_requested=False) + mocked_openai_chat.reset()