Skip to content

Commit

Permalink
Fix python 3.12 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fwkz committed Jan 17, 2024
1 parent a1abdae commit f1dc17c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.15, ubuntu-22.04]
os: [macOS-13, ubuntu-22.04]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
steps:
- uses: actions/checkout@v1
Expand Down
5 changes: 3 additions & 2 deletions tests/test_command.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import inspect
import unittest.mock
from unittest import mock

import pytest
Expand Down Expand Up @@ -104,7 +105,7 @@ def test_validate_guides(command, guides):
command._validate_guides()


@mock.patch("riposte.command.inspect")
@mock.patch("riposte.command.inspect", new_callable=unittest.mock.MagicMock)
def test_bind_arguments(inspect_mock, command):
args = (1, 2)
command._bind_arguments(*args)
Expand All @@ -113,7 +114,7 @@ def test_bind_arguments(inspect_mock, command):
inspect_mock.signature.return_value.bind.assert_called_once_with(*args)


@mock.patch("riposte.command.inspect")
@mock.patch("riposte.command.inspect", new_callable=unittest.mock.MagicMock)
def test_bind_arguments_exception(inspect_mock, command):
args = (1, 2)
inspect_mock.signature.return_value.bind.side_effect = TypeError
Expand Down

0 comments on commit f1dc17c

Please sign in to comment.