joythief.strings module¶
Matchers for the text sequence type (str).
- class joythief.strings.JsonString(expected=<object object>)[source]¶
-
Matches any
strinstance representing JSON.- Parameters:
expected (Any) – What the result of parsing the JSON should be. If omitted, any valid JSON string is matched.
- class joythief.strings.StringMatching(pattern: Pattern[str])[source]¶
- class joythief.strings.StringMatching(pattern: str, *, flags: int = 0)
-
Matches any
strinstance matching a regular expression.
- class joythief.strings.UrlString(*, scheme=None, hostname=None, path=None, query=None)[source]¶
-
Matches any
strinstance representing a URL.The string is parsed with
urlparse()and compared attribute-by-attribute. Any attributes not provided are ignored.- Parameters:
- Raises:
TypeError – if no arguments are provided.