def by_default_non_strings_are_not_accepted(): assert not is_description(None) assert not is_description(b"bytes") assert not is_description(0) assert not is_description(42) assert not is_description(("tuple",)) assert not is_description(["list"])
def after_registration_lazy_strings_are_accepted(): with registered(LazyString): assert is_description("not lazy") assert is_description(lazy_string) assert not is_description(42)
def by_default_strings_are_accepted(): is_description("") is_description("text")