diff options
| author | natsuoto <[email protected]> | 2026-07-01 16:18:31 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-01 16:18:31 +0530 |
| commit | 1860f7396e997c785d2299c421852909a0ee2070 (patch) | |
| tree | ea2d0971292c1a70737f1f068ec27d308974b88f /tests/errors | |
| parent | 42509f3a1d0c93c5fd43b2e2bdc42201d24a643e (diff) | |
| download | edify-1860f7396e997c785d2299c421852909a0ee2070.tar.xz edify-1860f7396e997c785d2299c421852909a0ee2070.zip | |
feat: varargs .one_of() and .any_of(*literals) chain-level shorthand
Diffstat (limited to 'tests/errors')
| -rw-r--r-- | tests/errors/errors.test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/errors/errors.test.py b/tests/errors/errors.test.py index 0f39228..6472469 100644 --- a/tests/errors/errors.test.py +++ b/tests/errors/errors.test.py @@ -6,6 +6,7 @@ from edify.errors.anchors import ( from edify.errors.captures import InvalidTotalCaptureGroupsIndexError from edify.errors.input import ( MustBeAStringError, + MustBeAtLeastOneLiteralError, MustBeAtLeastTwoOperandsError, MustBeInstanceError, MustBeIntegerGreaterThanZeroError, @@ -113,6 +114,11 @@ def test_must_be_at_least_two_operands(): assert "any_of requires at least two operands" in str(error) +def test_must_be_at_least_one_literal(): + error = MustBeAtLeastOneLiteralError("one_of") + assert "one_of requires at least one literal" in str(error) + + def test_name_not_valid(): error = NameNotValidError("bad name") assert "Name bad name is not valid" in str(error) |
