diff options
| author | natsuoto <[email protected]> | 2026-07-11 17:10:05 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-11 17:10:05 +0530 |
| commit | ef2e40b7eb1c5c29a9ec5f203e2927dc42a533e2 (patch) | |
| tree | fd1ad74c079af76f6d1d31d8920ec6b212ca3851 /tests | |
| parent | ef0d136cb9c6517c39bf0d693663034791eb0508 (diff) | |
| download | edify-ef2e40b7eb1c5c29a9ec5f203e2927dc42a533e2.tar.xz edify-ef2e40b7eb1c5c29a9ec5f203e2927dc42a533e2.zip | |
refactor(library): rewrite geo/postal to inline patterns; delete RegexBackedPattern escape hatch
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/library/media/regex.test.py | 13 | ||||
| -rw-r--r-- | tests/library/password.test.py | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/library/media/regex.test.py b/tests/library/media/regex.test.py new file mode 100644 index 0000000..c1c687c --- /dev/null +++ b/tests/library/media/regex.test.py @@ -0,0 +1,13 @@ +from edify.library import regex + + +def test_valid_regex(): + assert regex(r"^\d+$") + + +def test_invalid_regex(): + assert not regex(r"(?P<name>") + + +def test_non_string(): + assert not regex(42) diff --git a/tests/library/password.test.py b/tests/library/password.test.py index ec3b627..45b1672 100644 --- a/tests/library/password.test.py +++ b/tests/library/password.test.py @@ -13,3 +13,7 @@ def test_password(): ) is False ) + + +def test_password_rejects_non_string(): + assert password(42) is False |
