Created
August 1, 2020 06:50
-
-
Save MartinThoma/16ba6ae417dcb628c4e0146e385a0bcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hypothesis.strategies as s | |
from hypothesis import given | |
import mpu.string # Martins Python Utilities | |
@given(s.emails()) | |
def test_is_email(email): | |
assert mpu.string.is_email(email), f"is_email({email}) returned False" | |
@given(s.ip_addresses(v=4)) | |
def test_is_ipv4(ip): | |
assert mpu.string.is_ipv4(str(ip)), f"is_ipv4({ip}) returned False" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment