diff options
| author | natsuoto <[email protected]> | 2026-07-11 16:08:45 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-11 16:08:45 +0530 |
| commit | a0792e59e05b8f8bf3ea5040317f90a66fedd5d8 (patch) | |
| tree | e7fcd28f2ea033c4a431facca4f1bfc5de0059d8 /tests | |
| parent | afd3c93d23e83fb47d3e9f3c900dbe4ab3f563b5 (diff) | |
| download | edify-a0792e59e05b8f8bf3ea5040317f90a66fedd5d8.tar.xz edify-a0792e59e05b8f8bf3ea5040317f90a66fedd5d8.zip | |
chore: ruff format + lint fixes (en-dash → hyphen, line-length, script.py noqa)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/library/ip.test.py | 3 | ||||
| -rw-r--r-- | tests/library/phone.test.py | 3 | ||||
| -rw-r--r-- | tests/library/postal.test.py | 2 | ||||
| -rw-r--r-- | tests/library/url.test.py | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/tests/library/ip.test.py b/tests/library/ip.test.py index b288004..2028024 100644 --- a/tests/library/ip.test.py +++ b/tests/library/ip.test.py @@ -1,10 +1,13 @@ from edify.library import ip + def test_valid_ipv4(): assert ip("192.168.1.1") + def test_valid_ipv6(): assert ip("2001:db8::1") + def test_bad_ip(): assert not ip("999.999.999.999") diff --git a/tests/library/phone.test.py b/tests/library/phone.test.py index 53167c0..0076065 100644 --- a/tests/library/phone.test.py +++ b/tests/library/phone.test.py @@ -1,10 +1,13 @@ from edify.library import phone + def test_valid_phone(): assert phone("+1-555-1234") + def test_short_phone(): assert phone("911") + def test_bad_phone(): assert not phone("!!!") diff --git a/tests/library/postal.test.py b/tests/library/postal.test.py index 5527ac6..f4b3dc3 100644 --- a/tests/library/postal.test.py +++ b/tests/library/postal.test.py @@ -1,7 +1,9 @@ from edify.library import postal + def test_valid_postal(): assert postal("12345") + def test_bad_postal(): assert not postal("nope-!!!") diff --git a/tests/library/url.test.py b/tests/library/url.test.py index 50bad29..d4b2eeb 100644 --- a/tests/library/url.test.py +++ b/tests/library/url.test.py @@ -1,10 +1,13 @@ from edify.library import url + def test_valid_http_url(): assert url("http://example.com") + def test_valid_https_url(): assert url("https://example.com/path") + def test_bad_url(): assert not url("nope !!!") |
