def METHOD_NAME(self):
    # nonsense strings
    self._check_value_error('')
    self._check_value_error('\N{greek small letter pi}')
    if self.allow_bytes:
        self._check_value_error(b'')
        # bytes which can't be converted to strings via utf8
        self._check_value_error(b"\xFF")
    if self.exact_match:
        self._check_value_error("there's no way this is supported")