Skip to content

Commit

Permalink
chore: fix regex in added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastian Clerson committed Jan 4, 2023
1 parent 6142b1d commit 16dba2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions tests/test_mp_proxy_auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,12 @@ def test_getattr_physical_cchannel(
proxy_inst.lock.__exit__.assert_not_called()

# attribute does not exist
with pytest.raises(AttributeError, match="object has no attribute does_not_exist"):
with pytest.raises(
AttributeError, match="object has no attribute 'does_not_exist'"
):
mock_aux1.channel.does_not_exist
proxy_inst.lock.__enter__.assert_not_called()
proxy_inst.lock.__exit__.assert_not_called()
proxy_inst.lock.__enter__.assert_called_once()
proxy_inst.lock.__exit__.assert_called_once()


def test_create_auxiliary_instance(mp_proxy_auxiliary_inst, caplog):
Expand Down
8 changes: 5 additions & 3 deletions tests/test_proxy_auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ def test_getattr_physical_cchannel(
proxy_inst.lock.__exit__.assert_not_called()

# attribute does not exist
with pytest.raises(AttributeError, match="object has no attribute does_not_exist"):
with pytest.raises(
AttributeError, match="object has no attribute 'does_not_exist'"
):
mock_aux1.channel.does_not_exist
proxy_inst.lock.__enter__.assert_not_called()
proxy_inst.lock.__exit__.assert_not_called()
proxy_inst.lock.__enter__.assert_called_once()
proxy_inst.lock.__exit__.assert_called_once()


def test_get_proxy_con_pre_load(mocker, cchannel_inst):
Expand Down

0 comments on commit 16dba2c

Please sign in to comment.