Skip to content

Commit

Permalink
complete coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
marcorossi5 committed Feb 28, 2024
1 parent 1803e72 commit 1f0ec61
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_qibo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ def test_check_client_server_qibo_versions_with_version_match(mock_request: Mock
)


def test_check_client_server_qibo_versions_with_version_mismatch(
mock_qibo: Mock, mock_request: Mock
):
mock_qibo.__version__ = "0.2.1"
with (
patch(f"{PKG}.constants.MINIMUM_QIBO_VERSION_ALLOWED", "0.1.9"),
patch(f"{PKG}.logger") as mock_logger,
):
_get_tii_client()
mock_logger.warning.assert_called_once()


def test_check_client_server_qibo_versions_with_low_local_version(mock_qibo: Mock):
mock_qibo.__version__ = "0.0.1"
with pytest.raises(AssertionError):
Expand Down

0 comments on commit 1f0ec61

Please sign in to comment.