Skip to content

Commit

Permalink
use autotui-specific exception
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbreckenridge committed Mar 3, 2024
1 parent 471056e commit 2ec10b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_autotui.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def test_enum_use_key() -> None:

def test_enum_fails() -> None:
ds = {"choice": "xx"}
with pytest.raises(ValueError, match=r"Could not find xx on Enumeration"):
with pytest.raises(AutoTUIException, match=r"Could not find xx on Enumeration"):
autotui.deserialize_namedtuple(ds, DAT)


Expand Down Expand Up @@ -643,7 +643,7 @@ class UDAT(NamedTuple):
def test_removing_enum_value() -> None:
assert autotui.deserialize_namedtuple({"choice": "x"}, UDAT) == UDAT(choice=UEnum.x)

with pytest.raises(ValueError, match="Could not find z on Enumeration"):
with pytest.raises(AutoTUIException, match="Could not find z on Enumeration"):
autotui.deserialize_namedtuple({"choice": "z"}, UDAT)

with_none = UDAT(choice=None) # type: ignore
Expand Down

0 comments on commit 2ec10b5

Please sign in to comment.